How to create a CheckBox in WPF

This code creates a CheckBox control in WPF and adds a Checked event handler.

<CheckBox Margin="8,12,12,0" Name="CheckBox1" FontSize="14"
    Checked="CheckBox1_Checked" Height="30" VerticalAlignment="Top"
    Foreground="Red">
    Check Box
</CheckBox>

Here is the code for Checked event handler.

private void CheckBox1_Checked(object sender, RoutedEventArgs e)
{
    CheckBox1.Content = "Checked";
}