Udostępnij za pośrednictwem


SettingsFlyout.ShowIndependent Method

Definition

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

public:
 virtual void ShowIndependent() = ShowIndependent;
void ShowIndependent();
public void ShowIndependent();
function showIndependent()
Public Sub ShowIndependent ()

Examples

This example shows how to use the ShowIndependent method to open a SettingsFlyout from a button in your app.

<Button Content="App update settings" Click="UpdateSettingsButton_Click"/>
private void UpdateSettingsButton_Click(object sender, RoutedEventArgs e)
{
    UpdateSettingsFlyout updatesFlyout = new UpdateSettingsFlyout();
    updatesFlyout.ShowIndependent();
}

For more code in context, see Scenario 4 of the App settings sample and Quickstart: Add app help.

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 ShowIndependent method to open the SettingsFlyout from a button in your app. In this case, because the user did not open the SettingsFlyout from the SettingsPane, they should return to your app when they click the Back button.

Only one SettingsFlyout is shown at a time. Calling ShowIndependent 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