Selector.SelectionChanged (Evento)
.NET Framework 3.0
Occurs when the selection of a Selector changes.
Espacio de nombres: System.Windows.Controls.Primitives
Ensamblado: PresentationFramework (en presentationframework.dll)
Espacio de nombres XML: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Ensamblado: PresentationFramework (en presentationframework.dll)
Espacio de nombres 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, se pueden controlar los eventos que define una clase, pero no se pueden definir unos propios.
<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.