title: WPF ListBox Binding Update
body: <p>I'm brand new to WPF and I just managed to bind a list of specific class items to a ListBox. The ListBox now successfully displays them. Here's some code, the class first:</p>
  
  <pre><code>public class OrderItem
  {
      public int Quantity { get; set; }
      public string Name { get; set; }
      public Double Price { get; set; }
  }
  </code></pre>
  
  <p>Some dummy data and the binding, which all happens in the constructor of the main program:</p>
  
  <pre><code>List&lt;OrderItem&gt; currentOrderItems = new List&lt;OrderItem&gt;();
          currentOrderItems.Add(new OrderItem() { Quantity = 5, Name = "Test", Price = 5 });
          currentOrderItems.Add(new OrderItem() { Quantity = 15, Name = "Test test", Price = 6.66 });
          currentOrderItems.Add(new OrderItem() { Quantity = 1, Name = "Test 3", Price = 15.88 });
          listOrderItems.ItemsSource = currentOrderItems;
  </code></pre>
  
  <p>And the XAML:</p>
  
  <pre><code>&lt;ListBox HorizontalAlignment="Left" Margin="150,27,0,23" Name="listOrderItems" Width="150" FontFamily="Times New Roman" FontSize="12"&gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Grid Margin="4"&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;TextBlock Text="{Binding Quantity}" FontWeight="Bold"  /&gt;
                      &lt;TextBlock Grid.Column="1" Text="{Binding Name }" /&gt;
                      &lt;TextBlock Grid.Column="2" Text="{Binding Price }" /&gt;
                  &lt;/Grid&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListBox.ItemTemplate&gt;
      &lt;/ListBox&gt;
  </code></pre>
  
  <p>My question is how can I update the ListBox to display a new item that I'm adding to the List containing the data a.k.a. the OrderItems. If I add, remove or modify the List in any way, this is not reflected in the ListBox.
  Thanks!</p>