Class TabRendererOffice2003
This renderer allows user to draw TabPages with Office2003 style.
Inherited Members
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
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
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
DrawBackground(DrawTabEventArgs)
Declaration
protected override void DrawBackground(DrawTabEventArgs drawItemInfo)
Parameters
Type | Name | Description |
---|---|---|
DrawTabEventArgs | drawItemInfo |
Overrides
DrawBorders(DrawTabEventArgs)
Declaration
protected override void DrawBorders(DrawTabEventArgs drawItemInfo)
Parameters
Type | Name | Description |
---|---|---|
DrawTabEventArgs | drawItemInfo |
Overrides
DrawInterior(DrawTabEventArgs)
Declaration
protected override void DrawInterior(DrawTabEventArgs drawItemInfo)
Parameters
Type | Name | Description |
---|---|---|
DrawTabEventArgs | drawItemInfo |
Overrides
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
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
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
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
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
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
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
RegisterTabType()
Registers custom tab styles with the framework.
Declaration
public static void RegisterTabType()