HypernovaDesktop Components · docs
Binarymission
WinFormsScroll Bars › VerticalScrollBar

VerticalScrollBar

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.ScrollBars

Class VerticalScrollBar. Implements the vertical scrolling mode.

public class VerticalScrollBar : ScrollBarBase

Inherits from / implements: ScrollBarBase

Members at a glance

VerticalScrollBarInitializes a new instance of the VerticalScrollBar class.
VerticalScrollBarInitializes a new instance of the VerticalScrollBar class.
DefaultSizeGets the size this control starts out at before anything sets it.
HorizontalScrollBarHeightThis property is not relevant for the vertical mode. Please refer to the base class documentation.
IsDefaultScrollContextMenuEnabledGets or sets a value indicating whether this instance has the built-in / default scroll context menu enabled.
ShouldUseExtendedMenuControlForContextMenuGets or sets a value indicating whether the control should use the extended Binarymission menu control for displaying the context menu.
GetNavigatorControlRectReturns the bounds of one of the two arrow buttons.
GetThumbArtefactRectangleReturns where the thumb sits along the vertical track, sized from the ratio of the visible range to the whole range.
OnMouseDownRaises the MouseDown event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseEnterRaises the MouseEnter event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseLeaveRaises the MouseLeave event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseMoveRaises the MouseMove event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseUpRaises the MouseUp event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnResizeRaises the Resize event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.
OnSizeChangedRaises the SizeChanged event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.
PaintScrollBarDraws the vertical scroll bar: the track, then the thumb, then the arrow buttons.
PerformSizeRefreshRecalculates the vertical layout - the arrow buttons, the track and the thumb - after the control or its range changes.
LineDownOccurs when a small change occurs (Position increased).
LineUpOccurs when a small change occurs (Position decreased).
PageDownOccurs when a large change occurs (Position increased).
PageUpOccurs when a large change occurs (Position decreased).
ScrollOccurs when a scroll occurs.
ThumbDownOccurs when the thumb is moved down.
ThumbUpOccurs when the thumb is moved up.
VerticalScrollPositionChangedOccurs when scroll position changed.

Constructors

VerticalScrollBar

public VerticalScrollBar()

Initializes a new instance of the VerticalScrollBar class.

VerticalScrollBar

public VerticalScrollBar(IScrollersDockHost parentInstanceUsingThisScrollerInstance) : base(parentInstanceUsingThisScrollerInstance)

Initializes a new instance of the VerticalScrollBar class.

Properties

DefaultSize

protected override Size DefaultSize

Gets the size this control starts out at before anything sets it.

HorizontalScrollBarHeight

public override int HorizontalScrollBarHeight

This property is not relevant for the vertical mode. Please refer to the base class documentation.

IsDefaultScrollContextMenuEnabled

public bool IsDefaultScrollContextMenuEnabled

Gets or sets a value indicating whether this instance has the built-in / default scroll context menu enabled.

ShouldUseExtendedMenuControlForContextMenu

public bool ShouldUseExtendedMenuControlForContextMenu

Gets or sets a value indicating whether the control should use the extended Binarymission menu control for displaying the context menu.

Of course, this property is effective only when the vertical and horizontal scroll bar controls have their IsDefaultScrollContextMenuEnabled property set to true.

Methods

GetNavigatorControlRect

protected internal Rectangle GetNavigatorControlRect(bool isNavigatingUpwards)

Returns the bounds of one of the two arrow buttons.

isNavigatingUpwards
true for the up button, false for the down one.

Returns. The bounds of that button.

GetThumbArtefactRectangle

protected override Rectangle GetThumbArtefactRectangle()

Returns where the thumb sits along the vertical track, sized from the ratio of the visible range to the whole range.

Returns. The bounds of the thumb.

OnMouseDown

protected override void OnMouseDown(MouseEventArgs e)

Raises the MouseDown event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseEnter

protected override void OnMouseEnter(EventArgs e)

Raises the MouseEnter event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseLeave

protected override void OnMouseLeave(EventArgs e)

Raises the MouseLeave event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseMove

protected override void OnMouseMove(MouseEventArgs e)

Raises the MouseMove event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseUp

protected override void OnMouseUp(MouseEventArgs e)

Raises the MouseUp event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnResize

protected override void OnResize(EventArgs e)

Raises the Resize event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnSizeChanged

protected override void OnSizeChanged(EventArgs e)

Raises the SizeChanged event. VerticalScrollBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

PaintScrollBar

protected override void PaintScrollBar(Graphics g)

Draws the vertical scroll bar: the track, then the thumb, then the arrow buttons.

g
The surface to draw on.

PerformSizeRefresh

protected override void PerformSizeRefresh()

Recalculates the vertical layout - the arrow buttons, the track and the thumb - after the control or its range changes.

Events

LineDown

public event EventHandler LineDown

Occurs when a small change occurs (Position increased).

LineUp

public event EventHandler LineUp

Occurs when a small change occurs (Position decreased).

PageDown

public event EventHandler PageDown

Occurs when a large change occurs (Position increased).

PageUp

public event EventHandler PageUp

Occurs when a large change occurs (Position decreased).

Scroll

public event ScrollEventHandler Scroll

Occurs when a scroll occurs.

ThumbDown

public event EventHandler<ThumbEventArgs> ThumbDown

Occurs when the thumb is moved down.

ThumbUp

public event EventHandler<ThumbEventArgs> ThumbUp

Occurs when the thumb is moved up.

VerticalScrollPositionChanged

public event EventHandler<PositionChangedArgs> VerticalScrollPositionChanged

Occurs when scroll position changed.