예제 #1
0
        public static TabStyleProvider CreateProvider(FXTabControl tabControl)
        {
            TabStyleProvider provider;

            // Depending on the display style of the tabControl generate an appropriate provider.
            switch (tabControl.DisplayStyle)
            {
            case TabStyle.None:
                provider = new TabStyleProvider(tabControl);
                break;

            case TabStyle.Default:
                provider = new TabStyleDefaultProvider(tabControl);
                break;

            case TabStyle.Rounded:
                provider = new TabStyleRoundedProvider(tabControl);
                break;

            case TabStyle.FX:
                provider = new FXTabStyleProvider(tabControl);
                break;

            default:
                provider = new TabStyleDefaultProvider(tabControl);
                break;
            }

            provider.style = tabControl.DisplayStyle;
            return(provider);
        }
예제 #2
0
        public FXTabStyleProvider(FXTabControl tabControl) : base(tabControl)
        {
            radius        = 1;
            showTabCloser = false;

            // Must set after the _Radius as this is used in the calculations of the actual padding
            Padding = new Drawing.Point(8, 3);
        }
예제 #3
0
        protected TabStyleProvider(FXTabControl tabControl)
        {
            this.tabControl = tabControl;

            borderColor         = Color.Empty;
            borderColorSelected = Color.Empty;
            focusColor          = Color.Orange;

            imageAlign = tabControl.RightToLeftLayout
                ? ContentAlignment.MiddleRight : ContentAlignment.MiddleLeft;

            HotTrack = true;

            // Must set after the _Overlap as this is used
            // in the calculations of the actual padding
            Padding = new Drawing.Point(6 + (ShowTabCloser ? 6 : 0), 3);
        }
예제 #4
0
 private static bool ApplyTo(FXTabControl c)
 {
     c.BackColor = BackColor;
     c.ForeColor = ForeColor;
     c.DisplayStyleProvider.BackColor           = BackColor;
     c.DisplayStyleProvider.BackColorHot        = WorkspaceHighlight;
     c.DisplayStyleProvider.BackColorSelected   = Workspace;
     c.DisplayStyleProvider.CloserColorActive   = Workspace;
     c.DisplayStyleProvider.CloserColor         = ForeColor;
     c.DisplayStyleProvider.TextColor           = ForeColor;
     c.DisplayStyleProvider.TextColorSelected   = ForeColor;
     c.DisplayStyleProvider.TextColorDisabled   = HighlightBackColor;
     c.DisplayStyleProvider.BorderColor         = Color.Transparent;
     c.DisplayStyleProvider.BorderColorHot      = HighlightBackColor;
     c.DisplayStyleProvider.BorderColorSelected = HighlightBackColor;
     return(true);
 }
예제 #5
0
 public TabStyleRoundedProvider(FXTabControl tabControl) : base(tabControl)
 {
     radius = 10;
     //	Must set after the _Radius as this is used in the calculations of the actual padding
     Padding = new Drawing.Point(6, 3);
 }
예제 #6
0
 public TabStyleDefaultProvider(FXTabControl tabControl) : base(tabControl)
 {
     focusTrack = true;
     radius     = 2;
 }