ComponentFactory.Krypton.Toolkit.PaletteBorderInheritRedirect.GetBorderColor1 C# (CSharp) Method

GetBorderColor1() public method

Gets the first border color from the redirector.
public GetBorderColor1 ( PaletteState state ) : Color
state PaletteState Palette value should be applicable to this state.
return Color
        public override Color GetBorderColor1(PaletteState state)
        {
            return _redirect.GetBorderColor1(_style, state);
        }

Usage Example

        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            Rectangle RBorder = DisplayRectangle;

            RBorder.Inflate(1, 1);

            using (Pen PBorder = new Pen(m_PaletteTabPageBorder.GetBorderColor1(PaletteState.Normal)))
            {
                e.Graphics.DrawRectangle(PBorder, RBorder);
            }

            if (this.TabCount > 0)
            {
                using (RenderContext renderContext = new RenderContext(this, e.Graphics, e.ClipRectangle, m_Renderer))
                {
                    renderContext.Graphics.CompositingQuality = CompositingQuality.HighQuality;
                    renderContext.Graphics.SmoothingMode      = System.Drawing.Drawing2D.SmoothingMode.HighQuality;

                    int selectedIndex = this.SelectedIndex;
                    for (int index = 0; index <= this.TabCount - 1; index++)
                    {
                        if (index != selectedIndex)
                        {
                            this.PaintTab(index, renderContext);
                        }
                    }
                    if (selectedIndex >= 0)
                    {
                        this.PaintTab(selectedIndex, renderContext);
                    }
                }
            }
        }