Example #1
0
 /// <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();
 }
Example #2
0
        /// <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();
        }
Example #3
0
 /// <summary>
 /// Handles the GlobalPaletteChanged event of the KryptonManager control.
 /// </summary>
 private void KryptonManager_GlobalPaletteChanged(object sender, EventArgs e)
 {
     _borderColor = KryptonHelper.GetBorderColor();
     SetBackgroundColour();
 }