locked
Windows 8.1 SettingsFlyout showing its last used interface rather than default one

    Question

  • Hi,

    I have implemented SettingsFlyout in Windows Store App.

    App.xaml.cs Code:

            protected override void OnWindowCreated(WindowCreatedEventArgs args)
            {
                SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested;
            }
    
            private void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
            {
                args.Request.ApplicationCommands.Add(new SettingsCommand("configureapp", "ConfigureApp", (handler) => ShowCustomSettingFlyout()));
            }
    
            public void ShowCustomSettingFlyout()
            {
                Configure CF = new Configure();
                CF.Show();
            }

    Now it shows 'ConfigureApp' Menu in Settings of my Application. Clicking this Menu opens 'Configure' Flyout.

    Now in this 'Configure' Flyout I have button for opening 'SetPassword' Flyout to set password for application. If I dont enter password and dont click on save and close the 'SetPassword' Flyout it works good. Next time when I open Settings Menu 'ConfigureApp' I see 'Configure' Flyout only. But if I save the password from 'SetPassword' Flyout next time 'ConfigureApp' Menu opens 'SetPassword' Flyout directly. It's skipping the 'Configure' Flyout.

    I have tried every thing but its not working with two SettingsFlyouts so I created different StackPanels in 'Configure' Flyout and by clicking buttons just show & hide specific StackPanels but doing this same thing happen I open 'SetPassword'(StackPanel) by clicking button which have save button and textbox for saving password. After saving next time ConfigureApp just starts with 'SetPassword'(StackPanel) That means its not resetting itself everytime.

    It seems performing any action like setting or removing Password somehow changing default SettingsFlyout.

    Please Help



    • Edited by xSHERU Friday, September 12, 2014 9:05 PM
    Friday, September 12, 2014 1:54 PM

Answers

  • Hi xSHERU,

    Thanks for your detail explanation, your code looks as same as documentation: Quickstart: Add app settings

    However to enable navigate between flyouts, you could find a good sample from: http://code.msdn.microsoft.com/windowsapps/App-settings-sample-1f762f49, Scenario 5.

    ShowIndependent method might be what you need.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 15, 2014 2:43 AM
    Moderator