title: Set UpdateSourceTrigger to Explicit for WPF ListBox Item Source Controls using MVVM C#
body: <p>I'm having a Collection of type Employee Model Class. It has two properties empName and isChecked.</p>
  
  <blockquote>
    <p><strong>Expectation</strong> : I need to update the property isChecked from the
    Checkbox, while on Clicking the Apply Button. Otherwise it don't need
    to update the Property.</p>
  </blockquote>
  
  <pre><code>void Main()
  {
      Dictionary&lt;int, List&lt;Employee&gt;&gt; empList = new Dictionary&lt;int, List&lt;Employee&gt;&gt;()
      {
          {1, new List&lt;Employee&gt;() { new Employee() {empName = "Raj"}, new Employee() {empName = "Kumar"}}},
          {2, new List&lt;Employee&gt;() { new Employee() {empName = "Bala"}}}, 
          {3, new List&lt;Employee&gt;() { new Employee() {empName = "Manigandan"}}}, 
          {4, new List&lt;Employee&gt;() { new Employee() {empName = "Prayag"}, new Employee() {empName = "Pavithran"}}}, 
          {5, new List&lt;Employee&gt;() { new Employee() {empName = "Selva"}}},
      };
  
      empList.Dump();
  }
  
  public class Employee
  {
      public string empName { get; set; }
      public bool isChecked { get; set; }
  }
  </code></pre>
  
  <p>I Binded this Collection into a WPF ListBox using MVVM approach. The empName is Binded with TextBlock and isChecked is Binded with Checkbox.</p>
  
  <pre><code>&lt;ListBox ItemsSource="{Binding empList.Values, IsAsync=True, UpdateSourceTrigger=Explicit}"&gt;
      &lt;cust:BListBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
               &lt;CheckBox IsChecked="{Binding isChecked, UpdateSourceTrigger=Explicit}"&gt;
                   &lt;CheckBox.Content&gt;
                       &lt;StackPanel Orientation="Horizontal"&gt;
                           &lt;TextBlock Text="{Binding empName, IsAsync=True}" Visibility="Visible" /&gt;
                        &lt;/StackPanel&gt;
                    &lt;/CheckBox.Content&gt;
                &lt;/CheckBox&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListBox.ItemTemplate&gt;
  &lt;/ListBox&gt;
  
  &lt;Button Content="Apply" Command="{Binding ApplyChangesCommand}"/&gt;
  </code></pre>
  
  <p>The Command for the Apply Button is</p>
  
  <pre><code>public ICommand ApplyChangesCommand
          {
              get
              {
                  return new DelegatingCommand((object param) =&gt;
                  {
                      /// Logical Code. 
                  });
              }
          }
  </code></pre>
  
  <blockquote>
    <p>Note: Kindly use <strong>MVVM approach</strong>.</p>
  </blockquote>