1: <StackPanel>
2: <StackPanel.DataContext>
3: <local:User />
4: </StackPanel.DataContext>
5: <TextBlock Text="Registration Form" FontSize="16"/>
6: <TextBlock Text="Name" />
7: <TextBox Text="{Binding Name, Mode=TwoWay, ValidatesOnExceptions=True}"/> 8: <TextBlock Text="Gender" />
9: <StackPanel Orientation="Horizontal">
10: <RadioButton GroupName="Gender" Content="Male" IsChecked="True" />
11: <RadioButton GroupName="Gender" Content="Female"
12: IsChecked="{Binding Gender, Mode=TwoWay, ValidatesOnExceptions=True}" /> 13: </StackPanel>
14: <TextBlock Text="I Like Silverlight" />
15: <ComboBox x:Name="LikesSilverlightCombo"
16: SelectedItem="{Binding LikesSilverlight, Mode=TwoWay, 17: ValidatesOnExceptions=True, UpdateSourceTrigger=Explicit}"
>
18: <sys:String>Yes</sys:String>
19: <sys:String>No</sys:String>
20: </ComboBox>
21: <TextBlock Text="I've attended" />
22: <ListBox SelectionMode="Extended"
23: SelectedItem="{Binding Attended, Mode=TwoWay, ValidatesOnExceptions=True}"> 24: <sys:String>None</sys:String>
25: <sys:String>MIX 07</sys:String>
26: <sys:String>MIX 08</sys:String>
27: <sys:String>MIX 09</sys:String>
28: </ListBox>
29: <CheckBox x:Name="AcceptTermsCheckBox" Content="Accept Terms"
30: IsChecked="{Binding AcceptTerms, Mode=TwoWay, ValidatesOnExceptions=True}" /> 31: <Button Content="Register" Click="Validate"
32: IsEnabled="{Binding IsChecked, ElementName=AcceptTermsCheckBox}" /> 33: </StackPanel>