SettingsFlyout.BackClick event

Applies to Windows and Windows Phone

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

Syntax


Public Event BackClick As BackClickEventHandler


<SettingsFlyout BackClick="eventhandler"/>


Event information

Delegate BackClickEventHandler

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.

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.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

SettingsFlyout
BackClickEventArgs

 

 

Show:
© 2014 Microsoft