UIViewSettings.PreferredInteractionModeChanged 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.
An event that's raised when the system state has changed in such a way that the system's preferred user interaction mode might have changed. In response to this event being raised, call GetPreferredInteractionMode to retrieve the system's current preferred user interaction mode, and update your user interface (UI) if the preferred mode has changed.
// Register
event_token PreferredInteractionModeChanged(TypedEventHandler<UIViewSettings, IInspectable const&> const& handler) const;
// Revoke with event_token
void PreferredInteractionModeChanged(event_token const* cookie) const;
// Revoke with event_revoker
UIViewSettings::PreferredInteractionModeChanged_revoker PreferredInteractionModeChanged(auto_revoke_t, TypedEventHandler<UIViewSettings, IInspectable const&> const& handler) const;
public event TypedEventHandler<UIViewSettings,object> PreferredInteractionModeChanged;
function onPreferredInteractionModeChanged(eventArgs) { /* Your code */ }
uIViewSettings.addEventListener("preferredinteractionmodechanged", onPreferredInteractionModeChanged);
uIViewSettings.removeEventListener("preferredinteractionmodechanged", onPreferredInteractionModeChanged);
- or -
uIViewSettings.onpreferredinteractionmodechanged = onPreferredInteractionModeChanged;
Public Custom Event PreferredInteractionModeChanged As TypedEventHandler(Of UIViewSettings, Object)
Event Type
TypedEventHandler<UIViewSettings,IInspectable>
Windows requirements
| Requirements | Description |
|---|---|
| Device family |
Windows 11, version 24H2 (introduced in 10.0.26100.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced in v19.0)
|
Remarks
PreferredInteractionModeChanged is raised on a background thread, so your app should marshal the signal back to the proper thread for your app's user interface.
If PreferredInteractionModeChanged is not supported on the target device, then it will never be raised on that device.