Charm Bar is a brand new feature of Windows and is seen for the first time, it can be referred to as universal toolbar and thus you can access it from anywhere no matter which application you are working on. The two ways in which you can access the Charm Bar is, firstly, by dragging your mouse pointer to the top or bottom right corner of the screen (since the show desktop thing is also at the bottom right, I prefer the top right corner). You can alternatively press the Windows+C button on your computer to invoke the bar.
The Settings charm provides a single access point to all settings that are relevant in the user’s current context. The Settings charm is always available. Regardless of context, settings include system settings that always apply, system-brokered settings that enable users to control an app’s access to system devices and capabilities, and settings that are specified by the current app.
I will show you a step wise instruction on how to add a item in settings charm bar.
Step 1: Add the following namespaces
Step 2: Next you need to register for “
CommandsRequested” in your page, Add the handler during app initialization
SettingsPane.GetForCurrentView().CommandsRequested += OnSettingsPaneCommandRequested;
Step 3 : Add my handler that shows the settings text
private void OnSettingsPaneCommandRequested(SettingsPane sender,SettingsPaneCommandsRequestedEventArgs args)
args.Request.ApplicationCommands.Add(new SettingsCommand("commandID", "Command Name", DoOperation));
Step 4: Add
private void DoOperation(IUICommand command)
below is the
private async void DoOperation(IUICommand command)
Enjoy. Download Source code.