Selector.SelectionChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro