SettingsPane.CommandsRequested Événement

Définition

Notes

SettingsPane est déconseillé et peut ne pas fonctionner sur toutes les versions de Windows 10. Au lieu d’utiliser un ParamètresPane, intégrez les options de paramètres à l’expérience de l’application. Pour plus d’informations, consultez Recommandations pour les paramètres d’application.

Se produit lorsque l’utilisateur ouvre le volet paramètres. L’écoute de cet événement permet à l’application d’initialiser les commandes de paramètre et de suspendre son interface utilisateur jusqu’à ce que l’utilisateur ferme le volet.

Pendant cet événement, ajoutez vos objets SettingsCommand au vecteur ApplicationCommands disponible pour les rendre disponibles dans l’interface utilisateur SettingsPane.

/// [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) 

Type d'événement

Attributs

S’applique à