Example #1
0
        public HeaderPanel()
            : base()
        {
            InitializeComponent();

            this.Font = new Font(SystemFonts.CaptionFont,
                                                    SystemFonts.CaptionFont.Style);
            this.mfnt_CaptionFont = this.Font;

            this.mstr_CaptionText = this.GetType().Name;
            this.mint_CaptionHeight = SystemInformation.CaptionHeight;
            this.mclr_CaptionBeginColor = Color.FromKnownColor(KnownColor.InactiveCaption);
            this.mclr_CaptionEndColor = Color.FromKnownColor(KnownColor.ActiveCaption);
            this.menm_CaptionGradientMode = LinearGradientMode.Vertical;
            this.menm_CaptionPosition = HeaderPanelCaptionPositions.Top;

            this.menm_BorderStyle = HeaderPanelBorderStyles.Shadow;
            base.BorderStyle = 0;
            this.mclr_BorderColor = Color.FromKnownColor(KnownColor.ActiveCaption);

            this.mclr_StartColor = Color.FromKnownColor(KnownColor.Window);
            this.mclr_EndColor = Color.FromKnownColor(KnownColor.Window);
            this.menm_GradientMode = LinearGradientMode.Vertical;

            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.DoubleBuffer, true);
        }
Example #2
0
        public HeaderPanel()
            : base()
        {
            InitializeComponent();

            this.Font = new Font(SystemFonts.CaptionFont,
                                 SystemFonts.CaptionFont.Style);
            this.mfnt_CaptionFont = this.Font;

            this.mstr_CaptionText         = this.GetType().Name;
            this.mint_CaptionHeight       = SystemInformation.CaptionHeight;
            this.mclr_CaptionBeginColor   = Color.FromKnownColor(KnownColor.InactiveCaption);
            this.mclr_CaptionEndColor     = Color.FromKnownColor(KnownColor.ActiveCaption);
            this.menm_CaptionGradientMode = LinearGradientMode.Vertical;
            this.menm_CaptionPosition     = HeaderPanelCaptionPositions.Top;

            this.menm_BorderStyle = HeaderPanelBorderStyles.Shadow;
            base.BorderStyle      = 0;
            this.mclr_BorderColor = Color.FromKnownColor(KnownColor.ActiveCaption);

            this.mclr_StartColor   = Color.FromKnownColor(KnownColor.Window);
            this.mclr_EndColor     = Color.FromKnownColor(KnownColor.Window);
            this.menm_GradientMode = LinearGradientMode.Vertical;

            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.DoubleBuffer, true);
        }