MetroScrollBarRenderer Class
Provides a renderer for the ScrollBar control that has a metro color scheme.
public class MetroScrollBarRenderer : ScrollBarRenderer, IScrollBarRenderer, IDisposable, IUIRenderer
- Inheritance:
- object DisposableObjectBase UIRenderer ScrollBarRenderer object
- Implements:
- IScrollBarRenderer IDisposable IUIRenderer
Constructors
MetroScrollBarRenderer()
Initializes an instance of the class.
public MetroScrollBarRenderer()
MetroScrollBarRenderer(IWindowsColorScheme)
Initializes an instance of the class.
public MetroScrollBarRenderer(IWindowsColorScheme colorScheme)
| Parameter | Type | Description |
|---|---|---|
| colorScheme | IWindowsColorScheme | The IWindowsColorScheme to use as a base for the colors. |
MetroScrollBarRenderer(WindowsColorSchemeType)
Initializes an instance of the class.
public MetroScrollBarRenderer(WindowsColorSchemeType colorSchemeType)
| Parameter | Type | Description |
|---|---|---|
| colorSchemeType | WindowsColorSchemeType | The WindowsColorSchemeType to use as a base for the colors. |
Properties
BaseColorSchemeType
The WindowsColorSchemeType to use as a base for the colors.
public WindowsColorSchemeType BaseColorSchemeType { get; set; }
Property Value
DefaultThumbAscentPadding
The default value of the ThumbAscentPadding property.
DefaultThumbExtentPadding
The default value of the ThumbExtentPadding property.
ThumbAscentPadding
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).
ThumbExtentPadding
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).
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. |
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:
trueif 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:
trueif the property value has changed from its default; otherwise,false.
Inherited Members
- ScrollBarRenderer.IsSystemUserPreferenceColorChangeMonitored
- UIRenderer.Dispose(bool)
- UIRenderer.Equals(object)
- UIRenderer.GetHashCode()
- UIRenderer.OnColorSchemeChanged()
- UIRenderer.OnPropertyChanged(EventArgs)
- UIRenderer.OnSystemUserPreferenceColorChanged()
- UIRenderer.ColorScheme
- UIRenderer.PropertyChanged
- DisposableObjectBase.Dispose()
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object, object)
- object.ReferenceEquals(object, object)