September 2012
Intermediate to advanced
464 pages
10h 55m
English
Checkboxes and radio buttons are some of the most recognizable and useful controls. Checkboxes allow selecting or unselecting options, while radio buttons allow selecting one option out of several. Let's see how to use them in WPF.
Make sure Visual Studio is up and running.
We'll create a simple tea choosing application that uses checkboxes and radio buttons to make some tea:
CH04.SelectingOptions.MainWindow.xaml. Replace the Grid with a StackPanel.GroupBox with some tea type options to the StackPanel, as follows:<GroupBox Header="What kind of tea would you like?"> <StackPanel Margin="4" x:Name="_teaTypePanel"> <RadioButton ...