ArcGISPortalViewer.App.App_CommandsRequested C# (CSharp) Method

App_CommandsRequested() private method

private App_CommandsRequested ( SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args ) : void
sender Windows.UI.ApplicationSettings.SettingsPane
args Windows.UI.ApplicationSettings.SettingsPaneCommandsRequestedEventArgs
return void
        private void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            args.Request.ApplicationCommands.Clear();
            var settingsCmd = new SettingsCommand("Settings", "Settings", (x) =>
            {
                var settings = new SettingsFlyout(); 
                settings.Width = 345;
                settings.HeaderBackground = Application.Current.Resources["AppAccentBrush"] as Brush;
                settings.HeaderForeground = new SolidColorBrush(Colors.White);
                settings.Title = "Settings";
                settings.HorizontalContentAlignment = HorizontalAlignment.Stretch;
                settings.IconSource = new BitmapImage(new Uri("ms-appx:///Assets/SmallLogo.png"));
                settings.Content = new SettingsControl();
                settings.Show();
            });
            args.Request.ApplicationCommands.Add(settingsCmd);
        }