private void SettingsCommandInvokedHandler(IUICommand command) { ISettingsCommandInfo commandInfo = _commands[command.Id]; _settingsFlyout = new SettingsFlyout(); if (commandInfo.HeaderTextBrush != null) { _settingsFlyout.HeaderBrush = commandInfo.HeaderTextBrush; } else { if (_visualElement != null) { _settingsFlyout.HeaderBrush = new SolidColorBrush(_visualElement.BackgroundColor); } else { _settingsFlyout.HeaderBrush = new SolidColorBrush(Colors.Gray); } } _settingsFlyout.SmallLogoImageSource = _smallLogoImageSource; _settingsFlyout.HeaderText = command.Label; if (commandInfo.ContentBackgroundBrush != null) { _settingsFlyout.ContentBackgroundBrush = commandInfo.ContentBackgroundBrush; } else { #pragma warning disable 612,618 if (ContentBackgroundBrush != null) #pragma warning restore 612,618 { #pragma warning disable 612,618 _settingsFlyout.ContentBackgroundBrush = ContentBackgroundBrush; #pragma warning restore 612,618 } } if (commandInfo.ContentForegroundBrush != null) { _settingsFlyout.ContentForegroundBrush = commandInfo.ContentForegroundBrush; } _settingsFlyout.Content = commandInfo.Instance; _settingsFlyout.FlyoutWidth = commandInfo.Width; _settingsFlyout.IsOpen = true; }
private void SettingsCommandInvokedHandler(IUICommand command) { ISettingsCommandInfo commandInfo = _commands[command.Id]; _settingsFlyout = new Windows.UI.Xaml.Controls.SettingsFlyout(); _settingsFlyout.HeaderBackground = _headerBrush; _settingsFlyout.IconSource = _smallLogoImageSource; _settingsFlyout.Title = command.Label; #pragma warning disable 612,618 if (ContentBackgroundBrush != null) #pragma warning restore 612,618 { #pragma warning disable 612,618 _settingsFlyout.Background = ContentBackgroundBrush; #pragma warning restore 612,618 } _settingsFlyout.Content = commandInfo.Instance; _settingsFlyout.Width = commandInfo.LiteralWidth; _settingsFlyout.Show(); }
private void SettingsCommandInvokedHandler(IUICommand command) { ISettingsCommandInfo commandInfo = _commands[command.Id]; _settingsFlyout = new SettingsFlyout(); _settingsFlyout.HeaderBrush = _headerBrush; _settingsFlyout.SmallLogoImageSource = _smallLogoImageSource; _settingsFlyout.HeaderText = command.Label; #pragma warning disable 612,618 if (ContentBackgroundBrush != null) #pragma warning restore 612,618 { #pragma warning disable 612,618 _settingsFlyout.ContentBackgroundBrush = ContentBackgroundBrush; #pragma warning restore 612,618 } _settingsFlyout.Content = commandInfo.Instance; _settingsFlyout.FlyoutWidth = commandInfo.Width; _settingsFlyout.IsOpen = true; }