menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TabRendererOffice2003 - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TabRendererOffice2003

    This renderer allows user to draw TabPages with Office2003 style.

    Inheritance
    System.Object
    TabRendererBase
    TabRenderer3D
    OneNoteStyleRenderer
    TabRendererOffice2003
    Implements
    ITabRenderer
    System.IDisposable
    Inherited Members
    OneNoteStyleRenderer.BorderColor
    OneNoteStyleRenderer.CloseButtonPadding
    OneNoteStyleRenderer.CorrectCloseButtonPosition
    OneNoteStyleRenderer.CorrectPreferredSize(SizeF)
    OneNoteStyleRenderer.GetBoundsForScrolling()
    OneNoteStyleRenderer.GetCurrentBounds()
    OneNoteStyleRenderer.NeedRotateTextWhenVertical
    OneNoteStyleRenderer.ShouldDrawHighLightUpper
    OneNoteStyleRenderer.TabBorderColor
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    TabRenderer3D.AdjustBoundsAndGraphicsForAlignment(Graphics, RectangleF, TabAlignment)
    TabRenderer3D.GetPolygonFromBounds(RectangleF)
    TabRenderer3D.GetShadePolygonFromBounds(RectangleF)
    TabRenderer3D.OVERLAPX
    TabRenderer3D.OVERLAPY
    TabRendererBase.ApplyTransform(Graphics)
    TabRendererBase.Bounds
    TabRendererBase.CloseButtonBackColor
    TabRendererBase.CloseButtonBounds
    TabRendererBase.CloseButtonClicked
    TabRendererBase.CloseButtonHitTest(Point)
    TabRendererBase.CloseButtonSize
    TabRendererBase.CorrectInteriorBounds(RectangleF)
    TabRendererBase.Dispose()
    TabRendererBase.Dispose(Boolean)
    TabRendererBase.DrawCloseButton(Graphics, RectangleF)
    TabRendererBase.DrawCloseButton(Graphics, RectangleF, DrawTabEventArgs)
    TabRendererBase.DrawFocusRect(Graphics, RectangleF, Color, Color)
    TabRendererBase.DrawItemCallback
    TabRendererBase.DrawText(Graphics, RectangleF, String, StringFormat, DrawTabEventArgs)
    TabRendererBase.DrawTextAndImage(Graphics, RectangleF, DrawTabEventArgs)
    TabRendererBase.ForceDrawImage
    TabRendererBase.GetActiveForeColor()
    TabRendererBase.GetForeColor()
    TabRendererBase.GetItemPreferredSize(Graphics)
    TabRendererBase.GetRedrawBounds()
    TabRendererBase.GetTabFont(Boolean)
    TabRendererBase.HitCloseButton
    TabRendererBase.HotTrack
    TabRendererBase.ImageRect
    TabRendererBase.ImageTextPadding
    TabRendererBase.IsHotLightState(DrawItemState)
    TabRendererBase.IsSelectedState(DrawItemState)
    TabRendererBase.IsTextShrunk()
    TabRendererBase.NeedMirroredBackground()
    TabRendererBase.OnPaint(Graphics, Rectangle)
    TabRendererBase.panelRenderer
    TabRendererBase.RestoreGraphicsState(Graphics)
    TabRendererBase.SaveGraphicsState(Graphics, RectangleF)
    TabRendererBase.ShouldDrawRotatedWhenVertical
    TabRendererBase.ShouldDrawText
    TabRendererBase.ShowCloseButton
    TabRendererBase.ShowCloseButtonBackColor
    TabRendererBase.TabAlignment
    TabRendererBase.TabControl
    TabRendererBase.TabData
    TabRendererBase.TabPropertyChanged()
    TabRendererBase.TextBounds
    TabRendererBase.Visible
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class TabRendererOffice2003 : OneNoteStyleRenderer, ITabRenderer, IDisposable

    Constructors

    TabRendererOffice2003(ITabControl, ITabPanelRenderer)

    Initializes a new instance of the TabRendererOffice2003 class.

    Declaration
    public TabRendererOffice2003(ITabControl parent, ITabPanelRenderer panelRenderer)
    Parameters
    Type Name Description
    ITabControl parent

    The tab control parent.

    ITabPanelRenderer panelRenderer

    The ITabPanelRenderer parent.

    Fields

    c_defaultOverlapSizeX

    The default horizontal overlap.

    Declaration
    protected const int c_defaultOverlapSizeX = 26
    Field Value
    Type
    System.Int32

    DEF_BORDER_WIDTH

    Item border width.

    Declaration
    public const int DEF_BORDER_WIDTH = 1
    Field Value
    Type
    System.Int32

    DEF_SELECTION_LINE_WIDTH

    Width of line, drawn under items, when any item is selected.

    Declaration
    protected const int DEF_SELECTION_LINE_WIDTH = 5
    Field Value
    Type
    System.Int32

    Properties

    LabelEditOffsetY

    Returns y-coordinate offset for Label Edit control, in Tab's captions editable case.

    Declaration
    public override int LabelEditOffsetY { get; }
    Property Value
    Type
    System.Int32
    Overrides
    OneNoteStyleRenderer.LabelEditOffsetY

    TabPanelPropertyExtender

    Gets the ITabDefaultProperties instance that provides default properties for this renderer.

    Declaration
    public static StyleRendererPropertyOffice2003 TabPanelPropertyExtender { get; }
    Property Value
    Type
    StyleRendererPropertyOffice2003

    TabStyleName

    Gets the unique name of this tab renderer.

    Declaration
    public static string TabStyleName { get; }
    Property Value
    Type
    System.String

    Methods

    CorrectBounds(RectangleF)

    Declaration
    protected override RectangleF CorrectBounds(RectangleF bounds)
    Parameters
    Type Name Description
    System.Drawing.RectangleF bounds
    Returns
    Type
    System.Drawing.RectangleF
    Overrides
    TabRendererBase.CorrectBounds(RectangleF)

    CorrectInteriorBounds(RectangleF, RectangleF)

    Declaration
    protected override RectangleF CorrectInteriorBounds(RectangleF bounds, RectangleF interriorBounds)
    Parameters
    Type Name Description
    System.Drawing.RectangleF bounds
    System.Drawing.RectangleF interriorBounds
    Returns
    Type
    System.Drawing.RectangleF
    Overrides
    OneNoteStyleRenderer.CorrectInteriorBounds(RectangleF, RectangleF)

    DrawBackground(DrawTabEventArgs)

    Declaration
    protected override void DrawBackground(DrawTabEventArgs drawItemInfo)
    Parameters
    Type Name Description
    DrawTabEventArgs drawItemInfo
    Overrides
    OneNoteStyleRenderer.DrawBackground(DrawTabEventArgs)

    DrawBorders(DrawTabEventArgs)

    Declaration
    protected override void DrawBorders(DrawTabEventArgs drawItemInfo)
    Parameters
    Type Name Description
    DrawTabEventArgs drawItemInfo
    Overrides
    OneNoteStyleRenderer.DrawBorders(DrawTabEventArgs)

    DrawInterior(DrawTabEventArgs)

    Declaration
    protected override void DrawInterior(DrawTabEventArgs drawItemInfo)
    Parameters
    Type Name Description
    DrawTabEventArgs drawItemInfo
    Overrides
    OneNoteStyleRenderer.DrawInterior(DrawTabEventArgs)

    DrawShadow(Graphics, RectangleF)

    Draws shadow in specified Rectangle.

    Declaration
    protected virtual void DrawShadow(Graphics g, RectangleF shadowRectangle)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Graphics object

    System.Drawing.RectangleF shadowRectangle

    Shadow Ractangle

    GetBorderPathFromBounds(RectangleF)

    Declaration
    protected override GraphicsPath GetBorderPathFromBounds(RectangleF bounds)
    Parameters
    Type Name Description
    System.Drawing.RectangleF bounds
    Returns
    Type
    System.Drawing.Drawing2D.GraphicsPath
    Overrides
    OneNoteStyleRenderer.GetBorderPathFromBounds(RectangleF)

    GetBorderPathFromBounds(RectangleF, Boolean)

    Returns the border's path for item, based on item's bounds and whether item is selected or not.

    Declaration
    protected GraphicsPath GetBorderPathFromBounds(RectangleF bounds, bool bIsSelected)
    Parameters
    Type Name Description
    System.Drawing.RectangleF bounds

    Rectangle bounds

    System.Boolean bIsSelected

    true if selected

    Returns
    Type Description
    System.Drawing.Drawing2D.GraphicsPath

    Returns the border's path

    GetCloseButtonBounds(DrawTabEventArgs)

    Declaration
    protected override RectangleF GetCloseButtonBounds(DrawTabEventArgs drawItemInfo)
    Parameters
    Type Name Description
    DrawTabEventArgs drawItemInfo
    Returns
    Type
    System.Drawing.RectangleF
    Overrides
    OneNoteStyleRenderer.GetCloseButtonBounds(DrawTabEventArgs)

    GetInteriorBounds(RectangleF, Boolean)

    Gets the interior bounds

    Declaration
    protected override RectangleF GetInteriorBounds(RectangleF currentBounds, bool selectedTab)
    Parameters
    Type Name Description
    System.Drawing.RectangleF currentBounds

    Current Bounds

    System.Boolean selectedTab

    Selected Tab

    Returns
    Type Description
    System.Drawing.RectangleF

    Returns interrior bounds

    Overrides
    OneNoteStyleRenderer.GetInteriorBounds(RectangleF, Boolean)

    GetOverlapSize(SizeF)

    Returns the overlap size. Overridden. See GetOverlapSize(SizeF).

    Declaration
    public override SizeF GetOverlapSize(SizeF tabSize)
    Parameters
    Type Name Description
    System.Drawing.SizeF tabSize
    Returns
    Type Description
    System.Drawing.SizeF

    The overlap size.

    Overrides
    OneNoteStyleRenderer.GetOverlapSize(SizeF)
    Remarks

    This implementation returns (0, 0).

    GetPreferredSize(Graphics)

    Returns the preferred size for the tabs.

    Declaration
    public override SizeF GetPreferredSize(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The Graphics object.

    Returns
    Type Description
    System.Drawing.SizeF

    The preferred size.

    Overrides
    TabRendererBase.GetPreferredSize(Graphics)

    GetTextPosition(Graphics, String, Font, RectangleF, StringFormat)

    Returns the position where the text should be drawn given a layout rectangle and the Graphics context.

    Declaration
    public override RectangleF GetTextPosition(Graphics g, string text, Font font, RectangleF rectLayout, StringFormat stringformat)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics instance.

    System.String text

    The text to draw.

    System.Drawing.Font font

    The font with which to draw.

    System.Drawing.RectangleF rectLayout

    The layout rectangle.

    System.Drawing.StringFormat stringformat

    The System.Drawing.StringFormat.

    Returns
    Type Description
    System.Drawing.RectangleF

    The position where the text should be drawn.

    Overrides
    TabRendererBase.GetTextPosition(Graphics, String, Font, RectangleF, StringFormat)

    HitTest(PointF)

    Indicates whether the specified position is within the current bounds.

    Declaration
    public override bool HitTest(PointF mousePosition)
    Parameters
    Type Name Description
    System.Drawing.PointF mousePosition

    The mouse position to test.

    Returns
    Type Description
    System.Boolean

    True if hit; false otherwise.

    Overrides
    OneNoteStyleRenderer.HitTest(PointF)

    RegisterTabType()

    Registers custom tab styles with the framework.

    Declaration
    public static void RegisterTabType()

    Implements

    ITabRenderer
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved