locked
Closing a Settings Pane

    Question

  • I know that the Settings pane can be programmatically displayed by using

    SettingsPane.Show();

    The app itself should not close the settings pane, but I'm looking at a use case where the user clicked the Settings from the charms, and after 10 seconds if the user has not closed the settings pane, the app will close it.

    How do I close the SettingsPane programmatically?



    Thursday, February 13, 2014 12:24 PM

Answers

  • The Windows 8.0 SettingsPane does not come with a Hide() method, but will close automatically when it loses focus. So after 10 seconds you could return the focus to the current view:

    this.Focus(FocusState.Programmatic);
    Fyi: the Windows 8.1 SettingsFlyout has a Hide() method, so upgrading your code is also an option.

    Thursday, February 13, 2014 12:38 PM

All replies

  • The Windows 8.0 SettingsPane does not come with a Hide() method, but will close automatically when it loses focus. So after 10 seconds you could return the focus to the current view:

    this.Focus(FocusState.Programmatic);
    Fyi: the Windows 8.1 SettingsFlyout has a Hide() method, so upgrading your code is also an option.

    Thursday, February 13, 2014 12:38 PM
  • Why do you want to do this? It seems like a really good way to frustrate users who are slow to read or react.

    Can a screen reader read your page in 10 seconds? Can a user with a mouth stick hit your buttons that fast?

    --Rob

    Thursday, February 13, 2014 4:17 PM
    Owner
  • I agree with your point. You can consider the scenario as the settings pane should be closed after a certain period of time if the user has not taken any action on it and did not close.
    Thursday, February 13, 2014 7:44 PM