title: Binding checkbox issue in WPF MVVM
body: <p>I am facing a problem in getting the value from VM for checkbox IsChecked binding value. (I'm using MVVM Light).</p>
  
  <p><strong>My issue</strong>: When checkbox IsChecked is changed, it is not firing back to my VM property that I bind to.</p>
  
  <p>Below is the code.</p>
  
  <p>I have a class with boolean values (in a class file).</p>
  
  <pre><code>public class Rights
  {
      public bool bSales { get; set; }
      public bool bProduct { get; set; }
      public bool bZone { get; set; }
      public bool bPercentage { get; set; }
      public bool bUser { get; set; }
  }
  </code></pre>
  
  <p>And this is the property that my checkboxes will bind to (in VM).</p>
  
  <pre><code>private Rights user_Rights;
  public Rights User_Rights
  {
      get { return user_Rights; }
      set { Set(ref user_Rights, value); }
  }
  </code></pre>
  
  <p>And below is the property for my 'Select All' check box (in VM).</p>
  
  <pre><code>private bool? rights_All;
  public bool? Rights_All
  {
      get { return rights_All; }
      set
      {
          Set(ref rights_All, value);
  
          if (value == true)
          {
              User_Rights = new Rights() { bSales = true, bProduct = true, bPercentage = true, bZone = true, bUser = true };
          }
          else if(value == false)
          {
              User_Rights = new Rights() { bSales = false, bProduct = false, bPercentage = false, bZone = false, bUser = false };
          }
      }
  }
  </code></pre>
  
  <p>And finally, below is my XAML for the binding.</p>
  
  <pre><code>&lt;CheckBox Content="Sales PIC" IsChecked="{Binding User_Rights.bSales,Mode=TwoWay}" /&gt;
  &lt;CheckBox Content="Product" IsChecked="{Binding User_Rights.bProduct,Mode=TwoWay}" /&gt;
  &lt;CheckBox Content="Zone" IsChecked="{Binding User_Rights.bZone,Mode=TwoWay}" /&gt;
  &lt;CheckBox Content="Percentage" IsChecked="{Binding User_Rights.bPercentage}" /&gt;
  &lt;CheckBox Content="User" IsChecked="{Binding User_Rights.bUser}" /&gt;
  &lt;CheckBox Content="Select All" IsChecked="{Binding Rights_All}" /&gt;
  </code></pre>
  
  <p>Here is what I am doing in picture.
  <a href="https://i.stack.imgur.com/Bmq1S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bmq1S.png" alt="enter image description here"></a></p>
  
  <p>Any suggestion on where did I do wrong?
  Thanks.</p>