In This Article

WindowsScrollBarRenderer Class

Provides a renderer for the ScrollBar control that has a color scheme consistent with Windows defaults.

public class WindowsScrollBarRenderer : ScrollBarRenderer, IScrollBarRenderer, IDisposable, IUIRenderer
Inheritance:
object DisposableObjectBase UIRenderer ScrollBarRenderer object
Implements:
IScrollBarRenderer IDisposable IUIRenderer

Constructors

WindowsScrollBarRenderer()

Initializes an instance of the class.

public WindowsScrollBarRenderer()

WindowsScrollBarRenderer(IWindowsColorScheme)

Initializes an instance of the class.

protected WindowsScrollBarRenderer(IWindowsColorScheme colorScheme)
Parameter Type Description
colorScheme IWindowsColorScheme

The IWindowsColorScheme to use as a base for the colors.

Properties

UseThemes

Indicates whether themes should be used when drawing the control.

public bool UseThemes { get; set; }

Property Value

bool:

true if themes should be used when drawing the control; otherwise, false.

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

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

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

The event data.

bounds Rectangle

The bounds in which to draw.

thumb ScrollBarThumb

The ScrollBarThumb that is being painted.

Inherited Members

Extension Methods