EN
Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

SettingsFlyout.Show method

Applies to Windows and Windows Phone

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

Syntax


public void Show()

Parameters

This method has no parameters.

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.

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.

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
ShowIndependent
Quickstart: Add app settings
Quickstart: Add app help

 

 

Mostra:
© 2014 Microsoft