/// <summary>Initializes a new instance of the <see cref="VisualToggle" /> class.</summary> public VisualToggle() { Size = new Size(50, 25); _animationTimer = new Timer { Interval = 1 }; _animationTimer.Tick += AnimationTimerTick; _toggleType = ToggleTypes.YesNo; _buttonSize = new Size(20, 20); _trueTextToggle = "Yes"; _falseTextToggle = "No"; _border = new Border { Rounding = Settings.DefaultValue.Rounding.ToggleBorder }; _buttonBorder = new Border { Rounding = Settings.DefaultValue.Rounding.ToggleButton }; UpdateTheme(ThemeManager.Theme); }
/// <summary>Initializes a new instance of the <see cref="VisualToggle" /> class.</summary> public VisualToggle() { Size = new Size(50, 25); Font = StyleManager.Font; _animationTimer = new Timer { Interval = 1 }; _animationTimer.Tick += AnimationTimerTick; _controlColorState = new ColorState(); _buttonColorState = new ControlColorState(); _toggleType = ToggleTypes.YesNo; _buttonSize = new Size(20, 20); _border = new Border { Rounding = Settings.DefaultValue.Rounding.ToggleBorder }; _buttonBorder = new Border { Rounding = Settings.DefaultValue.Rounding.ToggleButton }; UpdateTheme(Settings.DefaultValue.DefaultStyle); }