Table of Contents

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

string

Methods

ScrollToSection(string)

Center the viewport to DOM element with the given Id

Task ScrollToSection(string id)

Parameters

id string

The Id of the DOM element, that should be centered

Returns

Task

ScrollToSection(Uri)

Center the viewport to the DOM element represented by the fragment inside the uri

Task ScrollToSection(Uri uri)

Parameters

uri Uri

The uri which contains the fragment. If no fragment it scrolls to the top of the page

Returns

Task

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

Task

StartSpying(string, string)

Start spying for scroll events for elements with the specified classes

Task StartSpying(string containerSelector, string sectionClassSelector)

Parameters

containerSelector string

the CSS selector to identify the scroll container

sectionClassSelector string

the CSS class (without .) to identify the section containers to spy on

Returns

Task

Events

ScrollSectionSectionCentered

event EventHandler<ScrollSectionCenteredEventArgs> ScrollSectionSectionCentered

Event Type

EventHandler<ScrollSectionCenteredEventArgs>