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.
DefaultThumbExtentPadding
Gets the default value of the ThumbExtentPadding property.
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).
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).
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
- ScrollBarRenderer.IsSystemUserPreferenceColorChangeMonitored
- UIRenderer.Dispose(bool)
- UIRenderer.Equals(object)
- UIRenderer.GetHashCode()
- UIRenderer.OnColorSchemeChanged()
- UIRenderer.OnPropertyChanged(EventArgs)
- UIRenderer.OnSystemUserPreferenceColorChanged()
- UIRenderer.ColorScheme
- UIRenderer.PropertyChanged
- DisposableObject.Dispose()
- DisposableObject.VerifyNotDisposed()
- DisposableObject.IsDisposed
- DisposableObject.Disposed
- MarshalByRefObject.GetLifetimeService()
- MarshalByRefObject.InitializeLifetimeService()
- MarshalByRefObject.MemberwiseClone(bool)
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object, object)
- object.ReferenceEquals(object, object)