title: RadioButton is checked, it's Checked event is call when run the app, and report exception
body: <p>There are two <code>RadioButton</code>s and two <code>Label</code>s in <code>.xaml</code>, and check one <code>RadioButton</code> make the corresponding <code>Label</code> Enable. <code>RadioButton1</code> is checked . Run the app, and the <code>Checked Event</code> is called automatically, but Label is null, so the app report exception. </p>
  
  <p>I just use a variable to mark whether the window is first created. Whether there are other methods? I don't know why the app run the events after initialize all components, who can tell me?</p>
  
  <p>MainWindow.xaml</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication7.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" 
          Height="350" 
          Width="525"&gt;
      &lt;StackPanel&gt;
          &lt;RadioButton
              GroupName="Group"
              IsChecked="True"
              Content="RadioButton1"
              x:Name="RadioButton1"
              Checked="RadioButton1_Checked"
              Unchecked="RadioButton1_Unchecked"/&gt;
          &lt;RadioButton
              GroupName="Group"
              Content="RadioButton2"
              x:Name="RadioButton2"
              Checked="RadioButton2_Checked"
              Unchecked="RadioButton2_Unchecked"/&gt;
          &lt;Label
              x:Name="Label1"
              Content="Label1"/&gt;
          &lt;Label
              IsEnabled="False"
              x:Name="Label2"
              Content="Label2"/&gt;
      &lt;/StackPanel&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>MainWindow.xaml.cs</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Windows;
  using System.Windows.Controls;
  using System.Windows.Data;
  using System.Windows.Documents;
  using System.Windows.Input;
  using System.Windows.Media;
  using System.Windows.Media.Imaging;
  using System.Windows.Navigation;
  using System.Windows.Shapes;
  
  namespace WpfApplication7
  {
      /// &lt;summary&gt;
      /// MainWindow.xaml
      /// &lt;/summary&gt;
      public partial class MainWindow : Window
      {
          private bool isFirstRun;
  
          public MainWindow()
          {
              isFirstRun = true;
  
              InitializeComponent();
  
              isFirstRun = false;
          }
  
          private void RadioButton1_Checked(object sender, RoutedEventArgs e)
          {
              if (isFirstRun)
                  return;
              Label1.IsEnabled = true;
          }
  
          private void RadioButton2_Checked(object sender, RoutedEventArgs e)
          {
              Label1.IsEnabled = false;
          }
  
          private void RadioButton1_Unchecked(object sender, RoutedEventArgs e)
          {
              Label2.IsEnabled = true;
          }
  
          private void RadioButton2_Unchecked(object sender, RoutedEventArgs e)
          {
              Label2.IsEnabled = false;
          }
      }
  }
  </code></pre>