If you add the xml attribute,
DynamicData="/GameData.Self.AFK" to your checkbox, it should work.
At least that's how the persona window appears to do it.
Code:
<Checkbox BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" DynamicData="/GameData.Self.AFK" Location="10,70" MinimumSize="22,22" Name="AFK" OnPress="afk" PackSize="a" ScrollExtent="318,22" Size="318,22" Style="/CommonElements.Checkbox.data.style" Tooltip=":42aee84249f893dd:When checked other players will see you as being away. Incoming messages will be automatically replied to with a message saying you are away.">:42aee8420c83ee2c:Away From Keyboard</Checkbox>