title: WPF CheckBox not getting checked at initiation (data binding)
body: <p>I've just come across this problem with my <code>CheckBox</code> data binding. The scenario is:</p>
  
  <p>When I initialize the user interface (start the application), the <code>CheckBox</code>es are unchecked, although the property they are bound to is set to true. When I click the <code>CheckBox</code>, the property is set to false, but the <code>CheckBox</code> is still shown as unchecked. From now on, the data binding works as expected and the <code>CheckBox</code> is correctly synched with the binding property.</p>
  
  <p>Here's my XAML code:</p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{Binding Path=DisplayTypes}"&gt;
      &lt;ItemsControl.ItemsPanel&gt;
          &lt;ItemsPanelTemplate&gt;
              &lt;WrapPanel /&gt;
          &lt;/ItemsPanelTemplate&gt;
      &lt;/ItemsControl.ItemsPanel&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate DataType="{x:Type Presentation:TypeDisplayPair}"&gt;
              &lt;CheckBox IsChecked="{Binding Display}" Margin="3"&gt;
                  &lt;TextBlock Text="{Binding Type}" Foreground="{Binding Color}" /&gt;
              &lt;/CheckBox&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>And my view model:</p>
  
  <pre><code>public class TypeDisplayPair : BaseViewModel
  {
      private bool display;
      private readonly Brush color;
  
      public TypeDisplayPair(string type, bool display)
      {
          Display = display;
          Type = type;
          color = BrushGenerator.GetRandomSolidColorBrush();
      }
  
      public string Type { get; set; }
  
      public bool Display
      {
          get { return display; }
          set
          {
              display = value;
              this.FirePropertyChanged(x =&gt; x.Display);
          }
      }
  
      public Brush Color
      {
          get { return color; }
      }
  }
  </code></pre>
  
  <p>Any suggestions are appreciated, as I've spent too much time debugging this and I've run out of ideas.</p>