ScrollBarBase
The base ScrollBarBase class. This is not intended to be derived outside of the Binarymission scrollbars assembly.
public abstract class ScrollBarBase : Control
Inherits from / implements: Control
Members at a glance
ScrollBarBase | Initializes a new instance of the ScrollBarBase class. |
ScrollBarBase | Initializes a new instance of the ScrollBarBase class docked into the given host. |
EarlierScrollPosition | Gets the earlier scroll position. |
HorizontalScrollBarHeight | Gets or sets the height of the horizontal scroll bar. |
IsDrawingCustomThumbImage | True while the thumb is being drawn from a caller-supplied image. The grip marks are suppressed in that case, so that a custom thumb image is not drawn over. |
LargeChange | Gets or sets the large change. |
MaximumScrollRange | Gets or sets the maximum scroll range. |
MinimumScrollRange | Gets or sets the minimum scroll range. |
PaddingGap | Gets or sets the padding gap. |
Position | Gets or sets the current scroll position. |
ScrollBarNavigationButtonRenderer | Gets or sets a custom scroll bar renderer for painting the navigation button and their content. |
ScrollBarRenderingConfigurator | Gets or sets the scroll bar rendering configurator. |
ScrollBarThumbGripperRenderer | Gets or sets a custom scroll bar renderer for painting the thumb gripper. |
ScrollBarThumbRenderer | Gets or sets a custom scroll bar renderer for painting the thumb. |
ScrollBarTrackRenderer | Gets or sets a custom scroll bar renderer for painting the track. |
ScrollServiceTargetControl | Gets or sets the scroll service target control. |
ShouldAutomaticallyPositionScroller | Gets or sets a value indicating whether the control should automatically position scroller. |
SmallChange | Gets or sets the small change. |
VerticalScrollBarWidth | Gets or sets the width of the vertical scroll bar. |
DrawScrollNavigator | Draws one arrow button, through the navigation button renderer when one is set. |
DrawThumbArtefactConditional | Draws the thumb, through the thumb renderer when one is set, and only when there is a thumb to draw - a range that fits entirely in view has none. |
GetThumbArtefactRectangle | Returns where the thumb is to be drawn. Override to change the thumb geometry without touching the rest of the painting. |
IsInputKey | Reports whether this control wants a key that the framework would otherwise treat as navigation. |
OnDpiChangedAfterParent | Raises the DpiChangedAfterParent event, so the bar follows a window that has been moved to a display at another scale. |
OnHandleCreated | Raises the HandleCreated event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior. |
OnKeyDown | Raises the KeyDown event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior. |
OnKeyUp | Raises the KeyUp event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior. |
OnMouseWheel | Raises the MouseWheel event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior. |
OnPaint | Raises the Paint event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior. |
OnParentChanged | Raises the ParentChanged event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior. |
OnTabStopChanged | Raises the TabStopChanged event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior. |
PaintBackground | Draws the track behind the thumb, through the track renderer when one is set. |
PaintScrollBar | Draws the whole scroll bar. The base does nothing; each concrete scroll bar overrides it and drives the individual paint helpers in the order its orientation needs. |
PerformSizeRefresh | Recalculates the layout after the control or its range changes. The base does nothing; each concrete scroll bar overrides it for its own orientation. |
WndProc | Processes the Windows messages sent to this control's window. |
HorizontalScrollBarHeightChanged | Occurs when horizontal scroll bar height changes. |
PositionChanged | Occurs when the scroll position changed. |
VerticalScrollBarWidthChanged | Occurs when vertical scroll bar width changes. |
_earlierScrolledPosition | The position before the current move, which is what the change notification reports as the old value. |
_executeNavigationEvent | Gates the scroll notification while a drag is in progress, so subscribers are told once the position settles rather than on every intermediate pixel. |
_gripperArtefactHeight | Height in pixels of the grip marks drawn on the thumb. |
_gripperArtefactWidth | Width in pixels of the grip marks drawn on the thumb. |
_largeChange | How far one click on the track, either side of the thumb, moves the position. |
_maximumScrollRange | The high end of the range the thumb travels over. |
_minimumScrollRange | The low end of the range the thumb travels over. |
_parentInstanceUsingThisScrollerInstance | The control this scroll bar is docked into, taken from the dock host passed to the constructor. |
_performCarefulSizing | Set when this scroll bar shares its host with a sibling scroll bar, so that resizing leaves room for the other one and for the corner square between them. |
_scrollPosition | Where the thumb currently sits within the range. Kept as a double so that a long range still moves smoothly over a short track. |
_scrollServiceTargetControl | The control this scroll bar scrolls. It is not necessarily the parent: a scroll bar can be docked in one container and drive the content of another. |
_shouldAutoScrolingActionEnd | Set to end the auto-repeat loop that runs while an arrow or the track is held down. |
_smallChange | How far one arrow-button click moves the position. |
_usingSibling | Reserved. Nothing in the library reads this field; it is protected, so it is part of the published surface and is left in place for source compatibility. |
Constructors
ScrollBarBase
Initializes a new instance of the ScrollBarBase class.
ScrollBarBase
Initializes a new instance of the ScrollBarBase class docked into the given host.
- parentInstanceUsingThisScrollerInstance
- The host this scroll bar docks into.
Properties
EarlierScrollPosition
Gets the earlier scroll position.
Value. The earlier scroll position.
HorizontalScrollBarHeight
Gets or sets the height of the horizontal scroll bar.
Value. The height of the horizontal scroll bar.
IsDrawingCustomThumbImage
True while the thumb is being drawn from a caller-supplied image. The grip marks are suppressed in that case, so that a custom thumb image is not drawn over.
LargeChange
Gets or sets the large change.
Value. The large change.
MaximumScrollRange
Gets or sets the maximum scroll range.
Value. The maximum scroll range.
MinimumScrollRange
Gets or sets the minimum scroll range.
Value. The minimum scroll range.
PaddingGap
Gets or sets the padding gap.
Value. The padding gap.
Position
Gets or sets the current scroll position.
Value. The current scroll position.
ScrollBarRenderingConfigurator
Gets or sets the scroll bar rendering configurator.
Value. The scroll bar rendering configurator.
ScrollBarThumbGripperRenderer
Gets or sets a custom scroll bar renderer for painting the thumb gripper.
ScrollBarThumbRenderer
Gets or sets a custom scroll bar renderer for painting the thumb.
ScrollBarTrackRenderer
Gets or sets a custom scroll bar renderer for painting the track.
ScrollServiceTargetControl
Gets or sets the scroll service target control.
Value. The scroll service target control.
ShouldAutomaticallyPositionScroller
Gets or sets a value indicating whether the control should automatically position scroller.
SmallChange
Gets or sets the small change.
Value. The small change.
VerticalScrollBarWidth
Gets or sets the width of the vertical scroll bar.
Value. The width of the vertical scroll bar.
Methods
DrawThumbArtefactConditional
Draws the thumb, through the thumb renderer when one is set, and only when there is a thumb to draw - a range that fits entirely in view has none.
- graphicsInstance
- The surface to draw on.
- controlVisualState
- Whether the thumb is idle, hot or pressed.
GetThumbArtefactRectangle
Returns where the thumb is to be drawn. Override to change the thumb geometry without touching the rest of the painting.
Returns. The bounds of the thumb, in client coordinates.
IsInputKey
Reports whether this control wants a key that the framework would otherwise treat as navigation.
OnDpiChangedAfterParent
Raises the DpiChangedAfterParent event, so the bar follows a window that has been moved to a display at another scale.
- e
- Not used.
OnHandleCreated
Raises the HandleCreated event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnKeyDown
Raises the KeyDown event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnKeyUp
Raises the KeyUp event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnMouseWheel
Raises the MouseWheel event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnPaint
Raises the Paint event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnParentChanged
Raises the ParentChanged event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnTabStopChanged
Raises the TabStopChanged event. ScrollBarBase overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
PaintBackground
Draws the track behind the thumb, through the track renderer when one is set.
- g
- The surface to draw on.
PaintScrollBar
Draws the whole scroll bar. The base does nothing; each concrete scroll bar overrides it and drives the individual paint helpers in the order its orientation needs.
- g
- The surface to draw on.
PerformSizeRefresh
Recalculates the layout after the control or its range changes. The base does nothing; each concrete scroll bar overrides it for its own orientation.
WndProc
Processes the Windows messages sent to this control's window.
Events
HorizontalScrollBarHeightChanged
Occurs when horizontal scroll bar height changes.
PositionChanged
Occurs when the scroll position changed.
VerticalScrollBarWidthChanged
Occurs when vertical scroll bar width changes.
Fields
_earlierScrolledPosition
The position before the current move, which is what the change notification reports as the old value.
_gripperArtefactHeight
Height in pixels of the grip marks drawn on the thumb.
_gripperArtefactWidth
Width in pixels of the grip marks drawn on the thumb.
_largeChange
How far one click on the track, either side of the thumb, moves the position.
_maximumScrollRange
The high end of the range the thumb travels over.
_minimumScrollRange
The low end of the range the thumb travels over.
_parentInstanceUsingThisScrollerInstance
The control this scroll bar is docked into, taken from the dock host passed to the constructor.
_performCarefulSizing
Set when this scroll bar shares its host with a sibling scroll bar, so that resizing leaves room for the other one and for the corner square between them.
_scrollPosition
Where the thumb currently sits within the range. Kept as a double so that a long range still moves smoothly over a short track.
_scrollServiceTargetControl
The control this scroll bar scrolls. It is not necessarily the parent: a scroll bar can be docked in one container and drive the content of another.
_shouldAutoScrolingActionEnd
Set to end the auto-repeat loop that runs while an arrow or the track is held down.
_smallChange
How far one arrow-button click moves the position.
_usingSibling
Reserved. Nothing in the library reads this field; it is protected, so it is part of the published surface and is left in place for source compatibility.