Selector.Unselected Attached Event

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Occurs when an item is unselected.

Namespace:   System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)

See AddUnselectedHandler, RemoveUnselectedHandler

Identifier field

UnselectedEvent

Routing strategy

Bubbling

Delegate

RoutedEventHandler

The following examples show how to use the Unselected event with a ListBox control and how to create an event handler.

<ListBoxItem Name="lbi0" Selected="OnSelected" Unselected="OnUnselected">
     Item 0</ListBoxItem>
private void OnUnselected(object sender, RoutedEventArgs e)
{
    Item.Content = ((ListBoxItem)sender).Name + " was unselected.";
}
Return to top
Show: