Time for me to start updating the old blog posts on Windows Store Apps, or rather- provide the Windows 8.1 equivalents. The first one is the Settingspane blog post. Previously you had to either hand craft one, or pull in a third party library. Now a control has been provided which makes it easier to add a Settingspane to an application.
Here is how you do it: (and yes, images and code is same as in the answer I provided on StackOverflow, they dislike links as links die, so therefore the duplication.)
Right click on project and select :
Add => New => SettingsFlyout
Then you simply register your commands.
Here is how to add the command, and have the MySettingsFlyout that we created open. In the App.cs we will override the OnWindowCreated and wire up the event handler there, and then set our commands with the right Flyout.
sealed partial class App
this.Suspending += OnSuspending;
protected override void OnWindowCreated(WindowCreatedEventArgs args)
SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested;
private void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
var setting = new SettingsCommand("MySetting", "MySetting", handler =>
// other stuff
In case the gets all messed up again, here is an image of the code above.
The result of this should be that once you click on the Settings command the flyout that was created should be opened, giving this result: