December 2014
Intermediate to advanced
512 pages
17h 4m
English
XAML enables you to add items to the two main types of collections that support indexing: lists and dictionaries.
A list is any collection that implements System.Collections.IList, such as System.Collections.ArrayList or numerous collection classes defined by various frameworks. For example, the following XAML adds two items to a ListBox control whose Items property is an ItemCollection that implements IList:
<ListBox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><ListBox.Items> <ListBoxItem Content="Item 1"/> <ListBoxItem Content="Item 2"/> </ListBox.Items></ListBox>
This is equivalent to the following code:
C# (WPF and Silverlight):
Read now
Unlock full access