Share via


SettingsPane.CommandsRequested Ereignis

Definition

Hinweis

SettingsPane ist veraltet und funktioniert möglicherweise nicht in allen Versionen von Windows 10. Anstatt eine Einstellungsspanne zu verwenden, integrieren Sie Einstellungsoptionen in die App-Benutzeroberfläche. Weitere Informationen finden Sie unter Richtlinien für App-Einstellungen.

Tritt auf, wenn der Benutzer den Einstellungsbereich öffnet. Beim Lauschen auf dieses Ereignis kann die App die Einstellungsbefehle initialisieren und die Benutzeroberfläche anhalten, bis der Benutzer den Bereich schließt.

Fügen Sie während dieses Ereignisses Ihre SettingsCommand-Objekte an den verfügbaren ApplicationCommands-Vektor an, um sie für die Benutzeroberfläche "Einstellungen"verfügbar zu machen.

/// [add: Windows.Foundation.Metadata.Deprecated("SettingsPane is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.UI.ApplicationSettings.ApplicationsSettingsContract)]
/// [remove: Windows.Foundation.Metadata.Deprecated("SettingsPane is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.UI.ApplicationSettings.ApplicationsSettingsContract)]
// Register
event_token CommandsRequested(TypedEventHandler<SettingsPane, SettingsPaneCommandsRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
SettingsPane::CommandsRequested_revoker CommandsRequested(auto_revoke_t, TypedEventHandler<SettingsPane, SettingsPaneCommandsRequestedEventArgs const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("SettingsPane is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.UI.ApplicationSettings.ApplicationsSettingsContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("SettingsPane is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.UI.ApplicationSettings.ApplicationsSettingsContract")]
// Register
event_token CommandsRequested(TypedEventHandler<SettingsPane, SettingsPaneCommandsRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
SettingsPane::CommandsRequested_revoker CommandsRequested(auto_revoke_t, TypedEventHandler<SettingsPane, SettingsPaneCommandsRequestedEventArgs const&> const& handler) const;
[add: Windows.Foundation.Metadata.Deprecated("SettingsPane is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.UI.ApplicationSettings.ApplicationsSettingsContract))]
[remove: Windows.Foundation.Metadata.Deprecated("SettingsPane is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.UI.ApplicationSettings.ApplicationsSettingsContract))]
public event TypedEventHandler<SettingsPane,SettingsPaneCommandsRequestedEventArgs> CommandsRequested;
[add: Windows.Foundation.Metadata.Deprecated("SettingsPane is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.UI.ApplicationSettings.ApplicationsSettingsContract")]
[remove: Windows.Foundation.Metadata.Deprecated("SettingsPane is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.UI.ApplicationSettings.ApplicationsSettingsContract")]
public event TypedEventHandler<SettingsPane,SettingsPaneCommandsRequestedEventArgs> CommandsRequested;
function onCommandsRequested(eventArgs) { /* Your code */ }
settingsPane.addEventListener("commandsrequested", onCommandsRequested);
settingsPane.removeEventListener("commandsrequested", onCommandsRequested);
- or -
settingsPane.oncommandsrequested = onCommandsRequested;
Public Custom Event CommandsRequested As TypedEventHandler(Of SettingsPane, SettingsPaneCommandsRequestedEventArgs) 

Ereignistyp

Attribute

Gilt für: