/// <summary> /// Initializes a new instance of the Panel class. /// </summary> public Panel() : base() { this.Style = PanelStyle.Custom; KryptonManager.GlobalPaletteChanged += new EventHandler(KryptonManager_GlobalPaletteChanged); _borderColor = KryptonHelper.GetBorderColor(); }
/// <summary> /// Sets the state of the control based on the current theme. /// </summary> private void SetThemeState() { if (DesignMode) { return; } var palette = KryptonHelper.GetCurrentPalette(); base.TrackProgressColor = KryptonManager.GetPaletteForMode(palette).GetBackColor1(PaletteBackStyle.ButtonStandalone, PaletteState.Pressed); base.TrackBorderColor = KryptonHelper.GetBorderColor(); base.ButtonBorderColor = KryptonHelper.GetBorderColor(); SetBackgroundColour(); Invalidate(); }
/// <summary> /// Handles the GlobalPaletteChanged event of the KryptonManager control. /// </summary> private void KryptonManager_GlobalPaletteChanged(object sender, EventArgs e) { _borderColor = KryptonHelper.GetBorderColor(); SetBackgroundColour(); }