Search This Blog

Wednesday, October 30, 2013

ItemsControl WPF

WPF > ControlsItemsControl

ItemsControl in WPF is a type of Control that can contain multiple items like strings, objects, etc.

To specify the collection used to generate the content of your ItemsControl use  Items or the ItemsSource property.

ItemsSource:
  • used to display a data collection or to bind an ItemsControl to a collection
  • any type that implements IEnumerable
  • when set the Items collection is set to read only 
Items:
  • can have different types (ListBox can contain strings, images)
  • can add items to the collection directly
Controls