ApplicationSettings.AddSettingsScenario.onCommandsRequested C# (CSharp) Method

onCommandsRequested() private method

private onCommandsRequested ( SettingsPane settingsPane, SettingsPaneCommandsRequestedEventArgs eventArgs ) : void
settingsPane Windows.UI.ApplicationSettings.SettingsPane
eventArgs Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs
return void
        void onCommandsRequested(SettingsPane settingsPane, SettingsPaneCommandsRequestedEventArgs eventArgs)
        {
            // TODO 2.2: create each setting to add to the Charm
            //           --> will invoke the same handler but just for the purpose of the demo
            UICommandInvokedHandler handler = new UICommandInvokedHandler(onSettingsCommand);

            SettingsCommand generalCommand = new SettingsCommand("generalSettings", "General", handler);
            eventArgs.Request.ApplicationCommands.Add(generalCommand);

            SettingsCommand helpCommand = new SettingsCommand("helpPage", "Help", handler);
            eventArgs.Request.ApplicationCommands.Add(helpCommand);
        }