In the previous recipes, you learned how a user can type text values and passwords within your application. But what about other types of data, such as a confirmation of accepting the rules? In such a case, the CheckBox
control can be used, as you will see in this recipe.
To add a checkbox and handle some of its events, perform the following steps:
Place the
CheckBox
control on the page and adjust its appearance by modifying the content of theMainPage.xaml
file as follows:<Page (...)> <Grid (...)> <CheckBox Content="I have read and accepted the rules." IsChecked="True" Foreground="RoyalBlue" FontSize="16" VerticalAlignment="Center" HorizontalAlignment...