/// <summary> /// Show the window color selector /// </summary> /// <param name="sender">the sender</param> /// <param name="e">the routed event arguments</param> private void WindowColorButton_Click(object sender, System.Windows.RoutedEventArgs e) { var viewModel = this.DataContext as CaptionSettingsFlyoutViewModel; this.ListSelector.LayoutMode = LongListSelectorLayoutMode.Grid; var colors = new Microsoft.PlayerFramework.CaptionSettings.Model.Color[] { Colors.White.ToCaptionSettingsColor(), Colors.Black.ToCaptionSettingsColor(), Colors.Red.ToCaptionSettingsColor(), Colors.Green.ToCaptionSettingsColor(), Colors.Blue.ToCaptionSettingsColor(), Colors.Yellow.ToCaptionSettingsColor(), Colors.Magenta.ToCaptionSettingsColor(), Colors.Cyan.ToCaptionSettingsColor() }; this.ShowListSelector( AppResources.WindowColor, colors, viewModel.Settings.WindowColor, this.OnWindowColorChanged, "ColorTemplate"); }
/// <summary> /// show the background color selector /// </summary> /// <param name="sender">the sender</param> /// <param name="e">the routed event arguments</param> private void BackgroundColorButton_Click(object sender, RoutedEventArgs e) { var viewModel = this.DataContext as CaptionSettingsFlyoutViewModel; var colors = new Microsoft.PlayerFramework.CaptionSettings.Model.Color[] { Colors.White.ToCaptionSettingsColor(), Colors.Black.ToCaptionSettingsColor(), Colors.Red.ToCaptionSettingsColor(), Colors.Green.ToCaptionSettingsColor(), Colors.Blue.ToCaptionSettingsColor(), Colors.Yellow.ToCaptionSettingsColor(), Colors.Magenta.ToCaptionSettingsColor(), Colors.Cyan.ToCaptionSettingsColor() }; this.ShowListSelector( AssemblyResources.GetString("BackgroundColor"), colors, viewModel.Settings.BackgroundColor, this.OnBackgroundColorChanged, "ColorTemplate"); }
/// <summary> /// Show the window color selector /// </summary> /// <param name="sender">the sender</param> /// <param name="e">the routed event arguments</param> private void WindowColorButton_Click(object sender, RoutedEventArgs e) { var viewModel = this.DataContext as CaptionSettingsFlyoutViewModel; var colors = new Microsoft.PlayerFramework.CaptionSettings.Model.Color[] { Colors.White.ToCaptionSettingsColor(), Colors.Black.ToCaptionSettingsColor(), Colors.Red.ToCaptionSettingsColor(), Colors.Green.ToCaptionSettingsColor(), Colors.Blue.ToCaptionSettingsColor(), Colors.Yellow.ToCaptionSettingsColor(), Colors.Magenta.ToCaptionSettingsColor(), Colors.Cyan.ToCaptionSettingsColor() }; this.ShowListSelector( AssemblyResources.GetString("WindowColor"), colors, viewModel.Settings.WindowColor, this.OnWindowColorChanged, "ColorTemplate"); }
/// <summary> /// show the background color selector /// </summary> /// <param name="sender">the sender</param> /// <param name="e">the routed event arguments</param> private void BackgroundColorButton_Click(object sender, System.Windows.RoutedEventArgs e) { var viewModel = this.DataContext as CaptionSettingsFlyoutViewModel; this.ListSelector.LayoutMode = LongListSelectorLayoutMode.Grid; var colors = new Microsoft.PlayerFramework.CaptionSettings.Model.Color[] { Colors.White.ToCaptionSettingsColor(), Colors.Black.ToCaptionSettingsColor(), Colors.Red.ToCaptionSettingsColor(), Colors.Green.ToCaptionSettingsColor(), Colors.Blue.ToCaptionSettingsColor(), Colors.Yellow.ToCaptionSettingsColor(), Colors.Magenta.ToCaptionSettingsColor(), Colors.Cyan.ToCaptionSettingsColor() }; this.ShowListSelector( AppResources.BackgroundColor, colors, viewModel.Settings.BackgroundColor, this.OnBackgroundColorChanged, "ColorTemplate"); }