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 MarshalByRefObject DisposableObject UIRenderer ScrollBarRenderer object
Implements:
IScrollBarRenderer IDisposable IUIRenderer

Constructors

WindowsScrollBarRenderer()

Initializes a new instance of the class.

public WindowsScrollBarRenderer()

Remarks

The default constructor initializes all fields to their default values.

WindowsScrollBarRenderer(IWindowsColorScheme)

Initializes a new instance of the class.

protected WindowsScrollBarRenderer(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

UseThemes

Gets 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

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.

Inherited Members

Extension Methods