In This Article

MetroScrollBarRenderer Class

Provides a renderer for the ScrollBar control that has a metro color scheme.

public class MetroScrollBarRenderer : ScrollBarRenderer, IScrollBarRenderer, IDisposable, IUIRenderer
Inheritance:
object MarshalByRefObject DisposableObject UIRenderer ScrollBarRenderer object
Implements:
IScrollBarRenderer IDisposable IUIRenderer

Constructors

MetroScrollBarRenderer()

Initializes a new instance of the MetroScrollBarRenderer class.

public MetroScrollBarRenderer()

Remarks

The default constructor initializes all fields to their default values.

MetroScrollBarRenderer(IWindowsColorScheme)

Initializes a new instance of the MetroScrollBarRenderer class.

public MetroScrollBarRenderer(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.

MetroScrollBarRenderer(WindowsColorSchemeType)

Initializes a new instance of the MetroScrollBarRenderer class.

public MetroScrollBarRenderer(WindowsColorSchemeType colorSchemeType)
Parameter Type Description
colorSchemeType WindowsColorSchemeType

The WindowsColorSchemeType to use as a base for the colors.

Properties

BaseColorSchemeType

Gets or sets the WindowsColorSchemeType to use as a base for the colors.

public WindowsColorSchemeType BaseColorSchemeType { get; set; }

Property Value

WindowsColorSchemeType:

The WindowsColorSchemeType to use as a base for the colors.

DefaultThumbAscentPadding

Gets the default value of the ThumbAscentPadding property.

public virtual int DefaultThumbAscentPadding { get; }

Property Value

int:

An integer value.

DefaultThumbExtentPadding

Gets the default value of the ThumbExtentPadding property.

public virtual int DefaultThumbExtentPadding { get; }

Property Value

int:

An integer value.

ThumbAscentPadding

Gets the padding to be applied to both sides of the ascent axis of the thumb element (e.g., top/bottom of horizontal scrollbar and left/right of vertical scrollbar).

public int ThumbAscentPadding { get; set; }

Property Value

int:

An integer value.

ThumbExtentPadding

Gets the padding to be applied to both sides of the extent axis of the thumb element (e.g., left/right of horizontal scrollbar and top/bottom of vertical scrollbar).

public int ThumbExtentPadding { get; set; }

Property Value

int:

An integer value.

Methods

DrawScrollBarBackground(PaintEventArgs, Rectangle, ScrollBar)

Draws the background of a ScrollBar control.

public override void DrawScrollBarBackground(PaintEventArgs e, Rectangle bounds, ScrollBar scrollBar)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

scrollBar ScrollBar

The ScrollBar being painted.

DrawScrollBarButton(PaintEventArgs, Rectangle, ScrollBarButton)

Draws a ScrollBarButton.

public override void DrawScrollBarButton(PaintEventArgs e, Rectangle bounds, ScrollBarButton button)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

button ScrollBarButton

The ScrollBarButton that is being painted.

DrawScrollBarThumb(PaintEventArgs, Rectangle, ScrollBarThumb)

Draws a ScrollBarThumb.

public override void DrawScrollBarThumb(PaintEventArgs e, Rectangle bounds, ScrollBarThumb thumb)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

bounds Rectangle

The bounds in which to draw.

thumb ScrollBarThumb

The ScrollBarThumb that is being painted.

ResetThumbAscentPadding()

Resets the ThumbAscentPadding property to its default value.

public virtual void ResetThumbAscentPadding()

ResetThumbExtentPadding()

Resets the ThumbExtentPadding property to its default value.

public virtual void ResetThumbExtentPadding()

ShouldSerializeThumbAscentPadding()

Indicates whether the ThumbAscentPadding property should be persisted.

public virtual bool ShouldSerializeThumbAscentPadding()

Returns

bool:

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

ShouldSerializeThumbExtentPadding()

Indicates whether the ThumbExtentPadding property should be persisted.

public virtual bool ShouldSerializeThumbExtentPadding()

Returns

bool:

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

Inherited Members

Extension Methods