Selector.SelectionChanged, événement
.NET Framework 3.0
Occurs when the selection of a Selector changes.
Espace de noms: System.Windows.Controls.Primitives
Assembly : PresentationFramework (dans presentationframework.dll)
Espace de noms XML : http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly : PresentationFramework (dans presentationframework.dll)
Espace de noms XML : http://schemas.microsoft.com/winfx/2006/xaml/presentation
/** @event */ public void add_SelectionChanged (SelectionChangedEventHandler value) /** @event */ public void remove_SelectionChanged (SelectionChangedEventHandler value)
En JScript, vous pouvez gérer les événements définis par une classe, mais vous ne pouvez pas définir les vôtres.
<object SelectionChanged="SelectionChangedEventHandler" .../>
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.