Monday, June 8, 2009

How to Use the ListBox Control

<UserControl x:Class="ListBox_Test.Page"
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
<Canvas>
<ListBox x:Name="list" Canvas.Top="10" Canvas.Left="10" Width="200" Height="200" SelectionChanged="list_ItemSelected">
<ListBoxItem Content="Australia" />
<ListBoxItem Content="Canada" />
<ListBoxItem Content="China" />
</ListBox>
</Canvas>
</UserControl>

No comments:

Post a Comment