Share via


ItemsView.SelectionChanged Event

Definition

Occurs when the selection of items changes.

// Register
event_token SelectionChanged(TypedEventHandler<ItemsView, ItemsViewSelectionChangedEventArgs const&> const& handler) const;

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

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

Event Type

Remarks

This event indicates that the SelectedItem and SelectedItems properties have changed. For example, this can be due to a user gesture or a method call such as Select, Deselect, SelectAll, DeselectAll, or InvertSelection.

Applies to