Jaa


SettingsFlyout.Show Method

Definition

Opens the Settings flyout, and returns the user to the Settings pane after the flyout is dismissed.

public:
 virtual void Show() = Show;
void Show();
public void Show();
function show()
Public Sub Show ()

Examples

private void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
    // Add update settings.
    Windows.UI.ApplicationSettings.SettingsCommand updateSetting =
        new Windows.UI.ApplicationSettings.SettingsCommand("AppUpdateSettings", "App updates", (handler) =>
        {
            UpdateSettingsFlyout updatesFlyout = new UpdateSettingsFlyout();
            updatesFlyout.Show();
        });

    args.Request.ApplicationCommands.Add(updateSetting);

    // Add account list.
    Windows.UI.ApplicationSettings.SettingsCommand accountListSetting =
        new Windows.UI.ApplicationSettings.SettingsCommand("AppAccountListSettings", "Accounts", (handler) =>
        {
            AccountListSettingsFlyout accountsListFlyout = new AccountListSettingsFlyout();
            accountsListFlyout.Show();
        });

    args.Request.ApplicationCommands.Add(accountListSetting);
}

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

Remarks

If a SettingsFlyout is shown by calling the Show method, then clicking the Back button reopens the SettingsPane after the SettingsFlyout dismisses. If a SettingsFlyout is shown by calling ShowIndependent, then clicking the Back button dismisses the SettingsFlyout and returns the user to the app; the SettingsPane is not reopened.

Call the Show method in your CommandsRequested event handler. This code is invoked when the user opens the SettingsFlyout from the SettingsPane, so you should return the user to the SettingsPane when they click the Back button.

Only one SettingsFlyout is shown at a time. Calling Show on a SettingsFlyout closes any other SettingsFlyout currently shown. The SettingsFlyout being closed completes its close animation before the new SettingsFlyout begins its show animation.

Applies to

See also