ScrollBar Blazor API

ScrollBar Properties

NameTypeDefaultDescription
DisabledboolfalseDetermines whether the element is interactive or inactive. When enabled, users can interact with the element as intended. When disabled, the element becomes unresponsive to user input and typically appears visually distinct to indicate its inactive state.
LargeStepint100Defines or retrieves the value of the scrollbar's large step increment. This large step value determines how much the scrollbar's position changes when the user clicks in the track area between the scrollbar's thumb (slider) and one of its arrow buttons. When the left mouse button is pressed in this area, the scrollbar advances or retreats by the specified large step amount, enabling quicker navigation through the content compared to single-step arrow button clicks.
UnlockKeystring""Gets or sets the 'unlockKey' property, which is a unique key used to activate or unlock access to the product’s features or functionality.
Localestring"en"Specifies or retrieves the current language setting. This property determines which language is used for displaying messages, working in conjunction with the messages property to select the appropriate set of localized text based on the specified language code (e.g., "en", "fr", "es").
Maxint1000Specifies or retrieves the maximum scrollable value of the scrollbar, determining the highest position to which the scrollbar thumb can be moved. This value defines the upper limit of the scrollable content range.
MechanicalActionDragMechanicalActionDragMechanicalAction.SwitchWhileDraggingSpecifies or retrieves the type of mechanical action applied to the element. Mechanical action determines the exact moment when the element's value is updated—such as immediately upon interaction, after a confirmation (like releasing a button), or according to specific user actions. This property allows you to control how and when changes to the element’s value are registered and processed within the application.
MessagesobjectN/ADefines an object containing string values that represent the various states of password strength (e.g., weak, medium, strong). Each key in the object corresponds to a specific strength level, allowing for customized messages or labels based on the user's password strength status.
Minint0Defines or retrieves the lowest possible value that the scrollbar can represent, determining the starting point of the scrollbar's range.
OrientationOrientationOrientation.HorizontalSpecifies or retrieves the orientation of the scrollbar, determining whether it is displayed horizontally or vertically.
ReadonlyboolfalseIf the element has the readonly attribute, users will be able to see its value but will not be able to modify, edit, or otherwise interact with its contents through input actions. However, the element may still be focusable and its value can be changed programmatically using scripts.
RightToLeftboolfalseSets or retrieves a value that specifies whether the element's content alignment is optimized for languages that use right-to-left (RTL) scripts, such as Arabic or Hebrew. When enabled, the element's layout, text direction, and associated styles are adjusted to properly support RTL locales.
ShowButtonsbooltrueControls the visibility of scrollbar buttons. When set, this property determines whether the scrollbar's increment and decrement buttons (commonly arrow buttons at the ends of the scrollbar) are shown or hidden. It can be used to either display or hide these buttons programmatically, and can also be queried to retrieve the current visibility state.
Stepint10Defines or retrieves the increment by which the scrollbar's value changes when a user clicks on the scrollbar's arrow (stepper) buttons. This value determines how much the scroll position increases or decreases with each button press, allowing for precise control over scrolling granularity.
Themestring""Specifies the theme to be applied to the element. The selected theme controls the visual appearance, including colors, typography, and overall styling, ensuring a consistent and cohesive look for the element within the user interface.
UnfocusableboolfalseWhen set to true, this property prevents the element from receiving keyboard focus, making it unreachable via tab navigation or programmatically using focus methods.
Valueint0Sets a new value for the widget or retrieves its current value, depending on how the method is invoked. This allows you to programmatically update the widget's data or access its existing data as needed.

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/ARe-renders the element by updating its visual presentation on the screen, ensuring that any recent changes to its properties, styles, or content are accurately reflected in the user interface.
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 whenever the value of the associated element is modified by the user or programmatically. It occurs immediately after the value has changed, allowing you to perform custom actions in response to the update.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 whenever the value of the associated element is modified by the user or programmatically. It occurs immediately after the value has changed, allowing you to perform custom actions in response to the update.ScrollBarChangedEventArgs

Enums

DragMechanicalAction

DragMechanicalAction.SwitchUntilReleased
DragMechanicalAction.SwitchWhenReleased
DragMechanicalAction.SwitchWhileDragging

Orientation

Orientation.Horizontal
Orientation.Vertical