In Windows Phone 8.1 dev, I need to build a form with a field for "Is Vaccinated" info. While it's a simple "Yes/No" question, I should be able to have a "Not informed" result if the user didn't even touch the control.
While I could do it checking the Checked event, I believe it would be easier to use a three-state checkbox and use its indeterminate state to represent the null, "Not informed" state.
While the idea is simple, when I set my checkbox to three-state, it does present 3-states. But visually, both indeterminate and false states look the same (empty checkbox).
Here's my code snippet:
<CheckBox x:Name="cbkIsVaccinated" Content="Is Vaccinated?" Margin="5,5,5,5" IsThreeState="True" IsChecked="{x:Null}" />
Is the indeterminate state not supported in WinRT or something like that? Because in this link, although it is from Windows Phone 8, it shows the indeterminate state nicely.
Aucun commentaire:
Enregistrer un commentaire