The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Selector::SelectionChanged Event
.NET Framework (current version)
Occurs when the selection of a Selector changes.
Assembly: PresentationFramework (in PresentationFramework.dll)
The following example shows how to attach the SelectionChanged event to a list box control.
<TextBox Name="tb" Width="140" Height="30"></TextBox> <ListBox Name="lb" Width="100" Height="55" SelectionChanged="PrintText" SelectionMode="Single"> <ListBoxItem>Item 1</ListBoxItem> <ListBoxItem>Item 2</ListBoxItem> <ListBoxItem>Item 3</ListBoxItem> <ListBoxItem>Item 4</ListBoxItem> <ListBoxItem>Item 5</ListBoxItem> <ListBoxItem>Item 6</ListBoxItem> <ListBoxItem>Item 7</ListBoxItem> <ListBoxItem>Item 8</ListBoxItem> <ListBoxItem>Item 9</ListBoxItem> <ListBoxItem>Item 10</ListBoxItem> </ListBox>
The following example shows how to handle the SelectionChanged event.
.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: