ScrollBar Blazor API

ScrollBar Properties

NameTypeDefaultDescription
DisabledboolfalseEnables or disables the element.
LargeStepint100Sets or gets the scrollbar's largestep. The value is increased/decreased with this largestep when the user presses the left mouse button in the area between a scrollbar button and thumb.
Localestring"en"Sets or gets the language. Used in conjunction with the property messages.
Maxint1000Sets or gets the scrollbar's maximum value.
MechanicalActionDragMechanicalActionDragMechanicalAction.SwitchWhileDraggingSets or gets the type of used mechanical action. The mechanical action defines in which moment the value of the element will be updated.
MessagesobjectN/ASets an object with string values, related to the different states of passwords strength.
Minint0Sets or gets the scrollbar's minimum value.
OrientationOrientationOrientation.HorizontalSets or gets the scrollbar's orientation
ReadonlyboolfalseIf the element is readonly, users cannot interact with it.
RightToLeftboolfalseSets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
ShowButtonsbooltrueSets or gets scrollbar buttons visibility.
Stepint10Sets or gets the scrollbar's step. The value is increased/decreased with this step when the user presses a scrollbar button.
Themestring""Determines the theme. Theme defines the look of the element
UnfocusableboolfalseIf is set to true, the element cannot be focused.
Valueint0Sets or gets the widget's value.

ScrollBar Methods

NameTypeArgumentsDescription
GetValueAsync()Task<int>'N/A'Gets the &quot;Value&quot; property as Task&lt;int&gt;.
Refreshvoid'N/A'Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements.
RefreshvoidN/ARedraws the element.
Rendervoid'N/A'Re-renders the Blazor Component. This method will make a full re-render.
StateHasChangedvoid'N/A'Refreshes the state and Re-renders the Blazor Component, if necessary.

ScrollBar Events

NameTypeDescriptionEvent Detail
OnChangeEventCallback<Event>This event is triggered when the value is changed.dynamic value- A numeric value indicating the scroll position., dynamic oldValue- A numeric value indicating the previous scroll position., dynamic min- A numeric value indicating the min scroll position., dynamic max- A numeric value indicating the max scroll position.
Changedevent ScrollBarChangedEventHandlerThis event is triggered when the value is changed.ScrollBarChangedEventArgs

Enums

DragMechanicalAction

DragMechanicalAction.SwitchUntilReleased
DragMechanicalAction.SwitchWhenReleased
DragMechanicalAction.SwitchWhileDragging

Orientation

Orientation.Horizontal
Orientation.Vertical