SettingsPane.CommandsRequested Kejadian

Definisi

Catatan

SettingsPane tidak digunakan lagi, dan mungkin tidak berfungsi pada semua versi Windows 10. Alih-alih menggunakan SettingsPane, integrasikan opsi pengaturan ke dalam pengalaman aplikasi. Untuk informasi selengkapnya, lihat Panduan untuk pengaturan aplikasi.

Terjadi saat pengguna membuka panel pengaturan. Mendengarkan peristiwa ini memungkinkan aplikasi menginisialisasi perintah pengaturan dan menjeda UI-nya hingga pengguna menutup panel.

Selama kejadian ini, tambahkan objek SettingsCommand Anda ke vektor ApplicationCommands yang tersedia untuk membuatnya tersedia untuk UI 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) 

Jenis Acara

Atribut

Berlaku untuk