<StackPanel>
<StackPanel.DataContext>
<local:User />
</StackPanel.DataContext>
<TextBlock Text="Registration Form" FontSize="16"/>
<TextBlock Text="Name" />
<TextBox Text="{Binding Name, Mode=TwoWay, ValidatesOnExceptions=True}"/>
<TextBlock Text="Gender" />
<StackPanel Orientation="Horizontal">
<RadioButton GroupName="Gender" Content="Male" IsChecked="True" />
<RadioButton GroupName="Gender" Content="Female"
IsChecked="{Binding Gender, Mode=TwoWay, ValidatesOnExceptions=True}" />
</StackPanel>
<TextBlock Text="I Like Silverlight" />
<ComboBox x:Name="LikesSilverlightCombo"
SelectedItem="{Binding LikesSilverlight, Mode=TwoWay,
ValidatesOnExceptions=True, UpdateSourceTrigger=Explicit}">
<sys:String>Yes</sys:String>
<sys:String>No</sys:String>
</ComboBox>
<TextBlock Text="I've attended" />
<ListBox SelectionMode="Extended"
SelectedItem="{Binding Attended, Mode=TwoWay, ValidatesOnExceptions=True}">
<sys:String>None</sys:String>
<sys:String>MIX 07</sys:String>
<sys:String>MIX 08</sys:String>
<sys:String>MIX 09</sys:String>
</ListBox>
<CheckBox x:Name="AcceptTermsCheckBox" Content="Accept Terms"
IsChecked="{Binding AcceptTerms, Mode=TwoWay, ValidatesOnExceptions=True}" />
<Button Content="Register" Click="Validate"
IsEnabled="{Binding IsChecked, ElementName=AcceptTermsCheckBox}" />
</StackPanel>