#pragma warning disable CA1822 namespace OINA.Extender.WPF.Testharness { using System.Windows; using System.Windows.Media; using OINA.Extender.Controls.Styles; /// /// Interaction logic for ImageViewerVisualSettings.xaml /// public partial class ImageViewerVisualSettings : Window { /// /// Gets or sets the color of ImageViewer Background Color. /// public Color BackgroundColor { get { return ImageViewerStyle.BackgroundColor; } set { ImageViewerStyle.BackgroundColor = value; } } /// /// Gets or sets the color of ImageView headers and Scale Bars foreground. /// public Color ForegroundColor { get { return ImageViewerStyle.ForegroundColor; } set { ImageViewerStyle.ForegroundColor = value; } } /// /// Gets or sets the header font family of ImageViewer. /// public FontFamily HeaderFontFamily { get { return ImageViewerStyle.HeaderFontFamily; } set { ImageViewerStyle.HeaderFontFamily = value; } } /// /// Gets or sets the header font size of ImageViewer. /// public double HeaderFontSize { get { return ImageViewerStyle.HeaderFontSize; } set { ImageViewerStyle.HeaderFontSize = value; } } /// /// Gets or sets the scale bar font size of ImageViewer. /// public double ScaleBarFontSize { get { return ImageViewerStyle.ScaleBarFontSize; } set { ImageViewerStyle.ScaleBarFontSize = value; } } /// /// ImageViewerVisualSettings /// public ImageViewerVisualSettings() { 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 OnResetStyle(object sender, RoutedEventArgs e) { ImageViewerStyle.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.ScaleBarFontSizeCombo.SelectedValue = this.ScaleBarFontSize; this.HeaderFontFamilyCombo.SelectedValue = this.HeaderFontFamily; this.HeaderFontSizeCombo.SelectedValue = this.HeaderFontSize; } } }