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