Dela via


Selector.SelectionChanged Event

Definition

Occurs when the currently selected item changes.

// Register
event_token SelectionChanged(SelectionChangedEventHandler const& handler) const;

// Revoke with event_token
void SelectionChanged(event_token const* cookie) const;

// Revoke with event_revoker
Selector::SelectionChanged_revoker SelectionChanged(auto_revoke_t, SelectionChangedEventHandler const& handler) const;
public event SelectionChangedEventHandler SelectionChanged;
function onSelectionChanged(eventArgs) { /* Your code */ }
selector.addEventListener("selectionchanged", onSelectionChanged);
selector.removeEventListener("selectionchanged", onSelectionChanged);
- or -
selector.onselectionchanged = onSelectionChanged;
Public Custom Event SelectionChanged As SelectionChangedEventHandler 
<selector SelectionChanged="eventhandler"/>

Event Type

Remarks

Note

For ListView and GridView: If the ItemsSource implements IItemsRangeInfo, and selection is modified using SelectRange or DeselectRange, the AddedItems and RemovedItems properties are not set in the SelectionChangedEventArgs. Setting these properties requires devirtualizing the item object. Use the SelectedRanges property to get the items instead.

Applies to