Interface IScrollSpy
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
public interface IScrollSpy : IAsyncDisposable
- Inherited Members
- Extension Methods
Properties
CenteredSection
Get the current position of the centered section
string CenteredSection { get; }
Property Value
Methods
ScrollToSection(string)
Center the viewport to DOM element with the given Id
Task ScrollToSection(string id)
Parameters
id
stringThe Id of the DOM element, that should be centered
Returns
ScrollToSection(Uri)
Center the viewport to the DOM element represented by the fragment inside the uri
Task ScrollToSection(Uri uri)
Parameters
uri
UriThe uri which contains the fragment. If no fragment it scrolls to the top of the page
Returns
SetSectionAsActive(string)
Does the same as ScrollToSection but without the scrolling. This can be used to initially set an value
Task SetSectionAsActive(string id)
Parameters
id
string
Returns
StartSpying(string, string)
Start spying for scroll events for elements with the specified classes
Task StartSpying(string containerSelector, string sectionClassSelector)
Parameters
containerSelector
stringthe CSS selector to identify the scroll container
sectionClassSelector
stringthe CSS class (without .) to identify the section containers to spy on
Returns
Events
ScrollSectionSectionCentered
event EventHandler<ScrollSectionCenteredEventArgs> ScrollSectionSectionCentered