Jaa


SettingsFlyout.BackClick Event

Definition

Occurs when the user clicks the back button on a SettingsFlyout control.

public:
 virtual event BackClickEventHandler ^ BackClick;
// Register
event_token BackClick(BackClickEventHandler const& handler) const;

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

// Revoke with event_revoker
SettingsFlyout::BackClick_revoker BackClick(auto_revoke_t, BackClickEventHandler const& handler) const;
public event BackClickEventHandler BackClick;
function onBackClick(eventArgs) { /* Your code */ }
settingsFlyout.addEventListener("backclick", onBackClick);
settingsFlyout.removeEventListener("backclick", onBackClick);
- or -
settingsFlyout.onbackclick = onBackClick;
Public Custom Event BackClick As BackClickEventHandler 
<SettingsFlyout BackClick="eventhandler"/>

Event Type

Examples

In this scenario, the Settings charm is used to open a SettingsFlyout that contains a list of accounts. When the user picks an account, a new SettingsFlyout is shown with options for the selected account.

Here, you handle the BackClick event of the second flyout so that when the user clicks the Back button, you show the account list again instead of the SettingsPane.

void AccountSettingsFlyout_BackClick(object sender, BackClickEventArgs e)
{
    e.Handled = true;
    AccountListSettingsFlyout accountList = new AccountListSettingsFlyout();
    accountList.Show();  
}

For more code in context, see Scenario 5 of the App settings sample.

Remarks

By default, clicking the back button on a SettingsFlyout control hides the control. Handle the BackClick event and set BackClickEventArgs.Handled to true to override this behavior and introduce your own logic.

This is useful when you have a SettingsFlyout that opens a second SettingsFlyout. By default, when the user taps the Back button on the second flyout, it will reopen the SettingsPane. You should handle the BackClick event and reopen the first flyout instead.

Applies to

See also