Hi All,
We can easily make any list box as enable to select multiple items in silver light.We just need to set the "SelectionMode" property of that list box below is the example for doing so.
ListBox Margin="5" x:Name="lbItems"
ItemsSource="{Binding Item, ElementName=MainPageView}"
SelectionMode="Multiple">
ListBox.ItemTemplate>
DataTemplate>
StackPanel Orientation="Horizontal" Margin="4">
TextBlock FontWeight="Bold" FontSize="12"
Foreground="#ff005588" Text="{Binding Text}">
/TextBlock>
/StackPanel>
/DataTemplate>
/ListBox.ItemTemplate>
/ListBox>
There are 3 options for the SelectionMode property that are:
Single -> Used to select only one item.
Multiple -> Used to select multiple items using Ctrl or Shift key.
Extended -> Used to select multiple items but here using Shift key you can select items range by just pressing one item, holding Shift and pressing another one.
| Next > |
|---|

Thanks Meetu, Its really a great and...
Good one
massive formating
Well described
Really nice but I do not like the for...