Exemplo n.º 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);
        }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
0
 protected virtual void DrawTabCloser(int index, Graphics graphics)
 {
     if (this._ShowTabCloser)
     {
         Rectangle closerRect = this._TabControl.GetTabCloserRect(index);
         graphics.SmoothingMode = SmoothingMode.AntiAlias;
         using (GraphicsPath closerPath = TabStyleProvider.GetCloserPath(closerRect))
         {
             if (closerRect.Contains(this._TabControl.MousePosition))
             {
                 using (Pen closerPen = new Pen(this._CloserColorActive))
                 {
                     graphics.DrawPath(closerPen, closerPath);
                 }
             }
             else
             {
                 using (Pen closerPen = new Pen(this._CloserColor))
                 {
                     graphics.DrawPath(closerPen, closerPath);
                 }
             }
         }
     }
 }