In This Article

ScrollBarRenderer Class

Provides a base renderer for the ScrollBar control.

[ToolboxBitmap(typeof(ScrollBarRenderer))]
[TypeConverter(typeof(GenericExpandableNullableObjectConverter))]
public abstract class ScrollBarRenderer : UIRenderer, IScrollBarRenderer, IDisposable, IUIRenderer
Inheritance:
object MarshalByRefObject DisposableObject UIRenderer object
Derived:
MetroScrollBarRenderer WindowsScrollBarRenderer
Implements:
IScrollBarRenderer IDisposable IUIRenderer

Constructors

ScrollBarRenderer()

Initializes a new instance of the ScrollBarRenderer class.

public ScrollBarRenderer()

Remarks

The default constructor initializes all fields to their default values.

ScrollBarRenderer(IWindowsColorScheme)

Initializes a new instance of the ScrollBarRenderer class.

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

IsSystemUserPreferenceColorChangeMonitored

Gets if the renderer should listen for changes in system user preferences and invoke OnSystemUserPreferenceColorChanged() when a color change is detected.

protected override bool IsSystemUserPreferenceColorChangeMonitored { get; }

Property Value

bool:

true if the renderer should monitor for changes; otherwise, false if the renderer should not monitor for changes. The default value is true.

Methods

DrawScrollBarBackground(PaintEventArgs, Rectangle, ScrollBar)

Draws the background of a ScrollBar control.

public abstract 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 abstract 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 abstract 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