Class ScrollManager
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
public class ScrollManager : IScrollManager
- Inheritance
-
ScrollManager
- Implements
- Inherited Members
- Extension Methods
Constructors
ScrollManager(IJSRuntime)
public ScrollManager(IJSRuntime jSRuntime)
Parameters
jSRuntime
IJSRuntime
Methods
LockScrollAsync(string, string)
public ValueTask LockScrollAsync(string selector = "body", string cssClass = "scroll-locked")
Parameters
Returns
ScrollIntoViewAsync(string, ScrollBehavior)
Scrolls the first instance of the selector into view.
public ValueTask ScrollIntoViewAsync(string selector, ScrollBehavior behavior)
Parameters
selector
stringbehavior
ScrollBehavior
Returns
ScrollToAsync(string, int, int, ScrollBehavior)
Scrolls to the coordinates of the element.
public ValueTask ScrollToAsync(string id, int left, int top, ScrollBehavior behavior)
Parameters
id
stringid of element
left
intx coordinate
top
inty coordinate
behavior
ScrollBehaviorsmooth or auto
Returns
ScrollToBottomAsync(string, ScrollBehavior)
Scroll to the bottom of the element (or if not found to the bottom of the page).
public ValueTask ScrollToBottomAsync(string id, ScrollBehavior behavior)
Parameters
id
stringid of element of null to scroll to page bottom
behavior
ScrollBehaviorsmooth or auto
Returns
ScrollToListItemAsync(string)
public ValueTask ScrollToListItemAsync(string elementId)
Parameters
elementId
string
Returns
ScrollToTopAsync(string, ScrollBehavior)
Scrolls to the top of the element.
public ValueTask ScrollToTopAsync(string id, ScrollBehavior scrollBehavior = ScrollBehavior.Auto)
Parameters
id
stringid of element
scrollBehavior
ScrollBehaviorsmooth or auto
Returns
ScrollToYearAsync(string)
public ValueTask ScrollToYearAsync(string elementId)
Parameters
elementId
string
Returns
UnlockScrollAsync(string, string)
public ValueTask UnlockScrollAsync(string selector = "body", string cssClass = "scroll-locked")