ToggleSwitch.Toggled 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 "On"/"Off" state changes for this ToggleSwitch.
// Register
event_token Toggled(RoutedEventHandler const& handler) const;
// Revoke with event_token
void Toggled(event_token const* cookie) const;
// Revoke with event_revoker
ToggleSwitch::Toggled_revoker Toggled(auto_revoke_t, RoutedEventHandler const& handler) const;
public event RoutedEventHandler Toggled;
function onToggled(eventArgs) { /* Your code */ }
toggleSwitch.addEventListener("toggled", onToggled);
toggleSwitch.removeEventListener("toggled", onToggled);
- or -
toggleSwitch.ontoggled = onToggled;
Public Custom Event Toggled As RoutedEventHandler
<ToggleSwitch Toggled="eventhandler"/>