In This Article

TabStripRenderer Class

Provides a base renderer for the TabStrip control.

[ToolboxBitmap(typeof(TabStripRenderer))]
[TypeConverter(typeof(GenericExpandableNullableObjectConverter))]
public abstract class TabStripRenderer : UIRenderer, IDisposable, ITabStripRenderer, IUIRenderer
Inheritance:
object MarshalByRefObject DisposableObject UIRenderer object
Derived:
VisualStudioTabStripRendererBase
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.

TabStripRenderer(IWindowsColorScheme)

Initializes a new instance of the TabStripRenderer class.

protected TabStripRenderer(IWindowsColorScheme colorScheme)
Parameter Type Description
colorScheme IWindowsColorScheme

The IWindowsColorScheme to use as a base for the colors.

Remarks

The default constructor initializes all fields to their default values.

Properties

AreImagesVisible

Gets or sets whether images are drawn.

public bool AreImagesVisible { get; set; }

Property Value

bool:

true if images can be drawn; otherwise, false.

CanAutoScaleImages

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

public bool CanAutoScaleImages { get; set; }

Property Value

bool:

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

bool:

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

int:

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

int:

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

int:

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

int:

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

int:

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

int:

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

int:

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

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.

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, bool)

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 bool

Whether to allow an image.

Returns

Size:

The Size of the tab.

OnSystemUserPreferenceColorChanged()

Occurs when user preferences are changed for the color category.

protected override void OnSystemUserPreferenceColorChanged()

Remarks

This method will only be invoked if IsSystemUserPreferenceColorChangeMonitored returns true.

ResetAll(bool)

Resets all property values to their defaults.

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

Whether to force resetting.

ResetAreImagesVisible()

Resets the CanAutoScaleImages property to its default value.

public virtual void ResetAreImagesVisible()

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()

ResolveFont(TabStripPage)

Gets the Font to be used for the TabStripPage based on the current state.

protected virtual Font ResolveFont(TabStripPage tabStripPage)
Parameter Type Description
tabStripPage TabStripPage

The tab strip page to examine.

Returns

Font:

The Font to be used.

ShouldSerializeAreImagesVisible()

Indicates whether the AreImagesVisible property should be persisted.

public virtual bool ShouldSerializeAreImagesVisible()

Returns

bool:

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

ShouldSerializeCanAutoScaleImages()

Indicates whether the CanAutoScaleImages property should be persisted.

public virtual bool ShouldSerializeCanAutoScaleImages()

Returns

bool:

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

bool:

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

bool:

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

bool:

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

bool:

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

bool:

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

bool:

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

bool:

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

bool:

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

bool:

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

bool:

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

bool:

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

Fields

logger

For internal use only.

protected readonly Logger logger

Inherited Members