In This Article

TabStripRenderer Class

Provides a base renderer for the TabStrip control.

public abstract class TabStripRenderer : DisposableObject, IDisposable, ITabStripRenderer, IUIRenderer
Inheritance:
Object MarshalByRefObject DisposableObject Object
Derived:
VisualStudio2002ToolWindowTabStripRenderer VisualStudio2005ToolWindowTabStripRenderer
Implements:
IDisposable ITabStripRenderer IUIRenderer

Constructors

TabStripRenderer()

Initializes a new instance of the TabStripRenderer class.

public TabStripRenderer()

Remarks

The default constructor initializes all fields to their default values.

Properties

CanAutoScaleImages

Gets or sets whether drawn images can auto-scale based on DPI.

public bool CanAutoScaleImages { get; set; }

Property Value

Boolean:

true if drawn images can auto-scale based on DPI; otherwise, false.

ResetAllPropertiesOnSystemColorChange

Gets or sets whether to reset all properties when a system color change event occurs.

public bool ResetAllPropertiesOnSystemColorChange { get; set; }

Property Value

Boolean:

true if all properties should be reset; otherwise, false.

TabStripButtonSize

Gets or sets the Size of a TabStrip button.

public virtual Size TabStripButtonSize { get; set; }

Property Value

Size:

The Size of a TabStrip button.

TabStripPageMargin

Gets or sets the margin space that surrounds a TabStripPage.

public virtual int TabStripPageMargin { get; set; }

Property Value

Int32:

The margin space that surrounds a TabStripPage.

TabStripTabImageMargin

Gets or sets the margin space that surrounds an image in a TabStripPage tab.

public virtual int TabStripTabImageMargin { get; set; }

Property Value

Int32:

The margin space that surrounds an image in a TabStripPage tab.

TabStripTabIndent

Gets or sets the amount of space that a TabStripPage tab should be indented.

public virtual int TabStripTabIndent { get; set; }

Property Value

Int32:

The amount of space that a TabStripPage tab should be indented.

TabStripTabInnerMargin

Gets or sets the margin space between a TabStripPage tab and the inner client area edge of the control.

public virtual int TabStripTabInnerMargin { get; set; }

Property Value

Int32:

The margin space between a TabStripPage tab and the inner client area edge of the control.

TabStripTabOuterMargin

Gets or sets the margin space between a TabStripPage tab and the outer edge of the control.

public virtual int TabStripTabOuterMargin { get; set; }

Property Value

Int32:

The margin space between a TabStripPage tab and the outer edge of the control.

TabStripTabOverlap

Gets or sets the amount of space that sequential TabStripPage tabs overlap each other.

public virtual int TabStripTabOverlap { get; set; }

Property Value

Int32:

The amount of space that sequential TabStripPage tabs overlap each other.

TabStripTabSelectedFont

Gets or sets the Font to use when drawing the selected tab of a TabStrip.

public virtual Font TabStripTabSelectedFont { get; set; }

Property Value

Font:

The Font to use when drawing the selected tab of a TabStrip.

TabStripTabTextMargin

Gets or sets the margin space that surrounds the text in a TabStripPage tab.

public virtual int TabStripTabTextMargin { get; set; }

Property Value

Int32:

The margin space that surrounds the text in a TabStripPage tab.

TabStripTabUnselectedFont

Gets or sets the Font to use when drawing the unselected tab of a TabStrip.

public virtual Font TabStripTabUnselectedFont { get; set; }

Property Value

Font:

The Font to use when drawing the unselected tab of a TabStrip.

Methods

Dispose(Boolean)

Disposes any resources used by the object.

protected override void Dispose(bool disposing)
Parameter Type Description
disposing Boolean

Whether the object is being disposed.

DrawTabStripBackground(PaintEventArgs, Rectangle, TabStrip)

Draws the background of a TabStrip control.

public abstract void DrawTabStripBackground(PaintEventArgs e, Rectangle bounds, TabStrip tabStrip)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

tabStrip TabStrip

The TabStrip being painted.

DrawTabStripButton(PaintEventArgs, Rectangle, TabStripButton)

Draws a TabStripButton.

public abstract void DrawTabStripButton(PaintEventArgs e, Rectangle bounds, TabStripButton button)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

button TabStripButton

The TabStripButton that is being painted.

DrawTabStripPageBackground(PaintEventArgs, Rectangle, TabStripPage)

Draws the background of a TabStripPage control.

public abstract void DrawTabStripPageBackground(PaintEventArgs e, Rectangle bounds, TabStripPage tabStripPage)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

tabStripPage TabStripPage

The TabStripPage being painted.

DrawTabStripTab(PaintEventArgs, Rectangle, TabStripTab)

Draws a TabStripTab.

public abstract void DrawTabStripTab(PaintEventArgs e, Rectangle bounds, TabStripTab tabStripTab)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

tabStripTab TabStripTab

The TabStripTab that is being painted.

Equals(Object)

Determines whether the specified Object is equal to the current Object.

public override bool Equals(object obj)
Parameter Type Description
obj Object

The Object to compare to the current Object.

Returns

Boolean:

true if the specified Object is equal to the current Object; otherwise, false.

GetHashCode()

Returns a hash code for this object.

public override int GetHashCode()

Returns

Int32:

An integer value that specifies a hash value for this object.

MeasureTabStripTab(Graphics, TabStripPage)

Measures the tab for the specified TabStripPage.

public virtual Size MeasureTabStripTab(Graphics g, TabStripPage tabStripPage)
Parameter Type Description
g Graphics

The Graphics object used to measure.

tabStripPage TabStripPage

The TabStripPage whose tab is being measured.

Returns

Size:

The Size of the tab.

MeasureTabStripTabCore(Graphics, TabStripPage, Boolean)

Measures the tab for the specified TabStripPage.

protected virtual Size MeasureTabStripTabCore(Graphics g, TabStripPage tabStripPage, bool allowImage)
Parameter Type Description
g Graphics

The Graphics object used to measure.

tabStripPage TabStripPage

The TabStripPage whose tab is being measured.

allowImage Boolean

Whether to allow an image.

Returns

Size:

The Size of the tab.

OnPropertyChanged(EventArgs)

Raises the PropertyChanged event.

protected virtual void OnPropertyChanged(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

ResetAll(Boolean)

Resets all property values to their defaults.

protected virtual void ResetAll(bool force)
Parameter Type Description
force Boolean

Whether to force resetting.

ResetCanAutoScaleImages()

Resets the CanAutoScaleImages property to its default value.

public virtual void ResetCanAutoScaleImages()

ResetResetAllPropertiesOnSystemColorChange()

Resets the ResetAllPropertiesOnSystemColorChange property to its default value.

public virtual void ResetResetAllPropertiesOnSystemColorChange()

ResetTabStripButtonSize()

Resets the TabStripButtonSize property to its default value.

public virtual void ResetTabStripButtonSize()

ResetTabStripPageMargin()

Resets the TabStripPageMargin property to its default value.

public virtual void ResetTabStripPageMargin()

ResetTabStripTabImageMargin()

Resets the TabStripTabImageMargin property to its default value.

public virtual void ResetTabStripTabImageMargin()

ResetTabStripTabIndent()

Resets the TabStripTabIndent property to its default value.

public virtual void ResetTabStripTabIndent()

ResetTabStripTabInnerMargin()

Resets the TabStripTabInnerMargin property to its default value.

public virtual void ResetTabStripTabInnerMargin()

ResetTabStripTabOuterMargin()

Resets the TabStripTabOuterMargin property to its default value.

public virtual void ResetTabStripTabOuterMargin()

ResetTabStripTabOverlap()

Resets the TabStripTabOverlap property to its default value.

public virtual void ResetTabStripTabOverlap()

ResetTabStripTabSelectedFont()

Resets the TabStripTabSelectedFont property to its default value.

public virtual void ResetTabStripTabSelectedFont()

ResetTabStripTabTextMargin()

Resets the TabStripTabTextMargin property to its default value.

public virtual void ResetTabStripTabTextMargin()

ResetTabStripTabUnselectedFont()

Resets the TabStripTabUnselectedFont property to its default value.

public virtual void ResetTabStripTabUnselectedFont()

ShouldSerializeCanAutoScaleImages()

Indicates whether the CanAutoScaleImages property should be persisted.

public virtual bool ShouldSerializeCanAutoScaleImages()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeResetAllPropertiesOnSystemColorChange()

Indicates whether the ResetAllPropertiesOnSystemColorChange property should be persisted.

public virtual bool ShouldSerializeResetAllPropertiesOnSystemColorChange()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripButtonSize()

Indicates whether the TabStripButtonSize property should be persisted.

public virtual bool ShouldSerializeTabStripButtonSize()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripPageMargin()

Indicates whether the TabStripPageMargin property should be persisted.

public virtual bool ShouldSerializeTabStripPageMargin()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripTabImageMargin()

Indicates whether the TabStripTabImageMargin property should be persisted.

public virtual bool ShouldSerializeTabStripTabImageMargin()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripTabIndent()

Indicates whether the TabStripTabIndent property should be persisted.

public virtual bool ShouldSerializeTabStripTabIndent()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripTabInnerMargin()

Indicates whether the TabStripTabInnerMargin property should be persisted.

public virtual bool ShouldSerializeTabStripTabInnerMargin()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripTabOuterMargin()

Indicates whether the TabStripTabOuterMargin property should be persisted.

public virtual bool ShouldSerializeTabStripTabOuterMargin()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripTabOverlap()

Indicates whether the TabStripTabOverlap property should be persisted.

public virtual bool ShouldSerializeTabStripTabOverlap()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripTabSelectedFont()

Indicates whether the TabStripTabSelectedFont property should be persisted.

public virtual bool ShouldSerializeTabStripTabSelectedFont()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripTabTextMargin()

Indicates whether the TabStripTabTextMargin property should be persisted.

public virtual bool ShouldSerializeTabStripTabTextMargin()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeTabStripTabUnselectedFont()

Indicates whether the TabStripTabUnselectedFont property should be persisted.

public virtual bool ShouldSerializeTabStripTabUnselectedFont()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

Events

PropertyChanged

Occurs after a property is changed.

public event EventHandler PropertyChanged

Event Type

EventHandler

Inherited Members