title: Windows 10 Development: How to refresh ListView whenever there is a change in the items inside ListView?
body: <p>I am very new to the concept of data binding and I don't think I understood it completely. I have a class named <code>Project</code> with a <code>LinkedList</code> of type <code>ToDo</code> as one of its properties. When I navigate to one instance of <code>Project</code>, I will display the <code>LinkedList</code> of type <code>ToDo</code> in a <code>ListView</code>. I have created functions that allow me to change the sequences of the nodes in the <code>LinkedList</code> (move up, move down) and to remove the selected node (delete). I want the <code>ListView</code> to refresh whenever there is a change in the <code>LinkedList</code>, (move up, move down or delete). However, I cannot achieve that. Here is my code: (not all parts are included)</p>
  
  <p>XAML of the page:</p>
  
  <pre><code>&lt;ListView x:Name="myListView" ItemsSource="{Binding Source={StaticResource ToDos}, Mode=TwoWay}"&gt;    
      &lt;ListView.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;StackPanel&gt;
                  &lt;CheckBox x:Name="myCheckBox" 
                            Content="{Binding ToDoTitle, Mode=TwoWay}" 
                            IsChecked="{Binding IsCompleted, Mode=TwoWay}"&gt;                         
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListView.ItemTemplate&gt;      
  &lt;/ListView&gt;
  </code></pre>
  
  <p>C# for DataModel:</p>
  
  <pre><code>public class ToDo : INotifyPropertyChanged
  {
      private string toDoTitle;
      private bool isCompleted;
      public event PropertyChangedEventHandler PropertyChanged = delegate { };
      public string ToDoTitle { get { return this.toDoTitle; } set { this.toDoTitle = value; this.OnPropertyChanged(); } }
      public bool IsCompleted { get { return this.isCompleted; } set { this.isCompleted = value; this.OnPropertyChanged(); } }
  
      public void OnPropertyChanged([CallerMemberName] string propertyName = null)
      {
          // Raise the PropertyChanged event, passing the name of the property whose value has changed.
          this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
      }
  
  }
  
  public class Projects : INotifyPropertyChanged
  {
      private LinkedList&lt;ToDo&gt; toDos;
  
      public event PropertyChangedEventHandler PropertyChanged = delegate { };
  
      public LinkedList&lt;ToDo&gt; ToDos { get { return this.toDos; } set { this.toDos = value; this.OnCollectionChanged(); } }
  
      public Projects()
      {
          ToDos = new LinkedList&lt;ToDo&gt;();
  
      }
      public void OnPropertyChanged([CallerMemberName] string propertyName = null)
      {
          // Raise the PropertyChanged event, passing the name of the property whose value has changed.
          this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
      }
  }
  </code></pre>
  
  <p>Thank you.</p>