#pragma warning disable CA1822 namespace OINA.Extender.WPF.Testharness { using System.Windows; using System.Windows.Media; using OINA.Extender.Controls.Styles; /// /// Interaction logic for ElementComboVisualSettings.xaml /// public partial class ElementComboVisualSettings { /// /// Gets or sets the color of the ComboBox background. /// public Color BackgroundColor { get { return ElementComboStyle.Background; } set { ElementComboStyle.Background = value; } } /// /// Gets or sets the color of the ComboBox foreground. /// public Color ForegroundColor { get { return ElementComboStyle.Foreground; } set { ElementComboStyle.Foreground = value; } } /// /// Gets or sets the font size of the element ComboBox. /// public double ComboFontSize { get { return ElementComboStyle.ComboFontSize; } set { ElementComboStyle.ComboFontSize = value; } } /// /// Initializes a new instance of the class. /// public ElementComboVisualSettings() { this.InitializeComponent(); this.DataContext = this; this.UpdateCombos(); } /// /// Handles the Click event of the ResetStylesButton control. /// /// The source of the event. /// The instance containing the event data. private void ResetStyleButton_Click(object sender, RoutedEventArgs e) { ElementComboStyle.ResetStyles(); this.UpdateCombos(); } /// /// Sets the combo boxes to have the values from the dictionary /// private void UpdateCombos() { this.BackgroundColorCombo.SelectedColor = this.BackgroundColor; this.ForegroundColorCombo.SelectedColor = this.ForegroundColor; this.FontSizeCombo.SelectedValue = this.ComboFontSize; } } }