Table of Contents

Interface IResizeObserver

Namespace
MudBlazor.Services
Assembly
MudBlazor.dll

Interface for observing resize events on elements.

public interface IResizeObserver : IAsyncDisposable
Inherited Members
Extension Methods

Methods

GetHeight(ElementReference)

Gets the height of the specified element.

double GetHeight(ElementReference reference)

Parameters

reference ElementReference

The element reference.

Returns

double

The height of the element.

GetSizeInfo(ElementReference)

Gets the size information of the specified element.

BoundingClientRect? GetSizeInfo(ElementReference reference)

Parameters

reference ElementReference

The element reference.

Returns

BoundingClientRect

The bounding client rectangle of the element.

GetWidth(ElementReference)

Gets the width of the specified element.

double GetWidth(ElementReference reference)

Parameters

reference ElementReference

The element reference.

Returns

double

The width of the element.

IsElementObserved(ElementReference)

Checks if the specified element is being observed.

bool IsElementObserved(ElementReference reference)

Parameters

reference ElementReference

The element reference.

Returns

bool

True if the element is being observed, otherwise false.

Observe(ElementReference)

Observes the specified element for resize events.

Task<BoundingClientRect?> Observe(ElementReference element)

Parameters

element ElementReference

The element to observe.

Returns

Task<BoundingClientRect>

A task that represents the asynchronous operation, containing the bounding client rectangle of the observed element.

Observe(IEnumerable<ElementReference>)

Observes the specified elements for resize events.

Task<IEnumerable<BoundingClientRect>> Observe(IEnumerable<ElementReference> elements)

Parameters

elements IEnumerable<ElementReference>

The elements to observe.

Returns

Task<IEnumerable<BoundingClientRect>>

A task that represents the asynchronous operation, containing the bounding client rectangles of the observed elements.

Unobserve(ElementReference)

Stops observing the specified element for resize events.

Task Unobserve(ElementReference element)

Parameters

element ElementReference

The element to stop observing.

Returns

Task

A task that represents the asynchronous operation.

Events

OnResized

Event triggered when the size of an observed element changes.

event SizeChanged OnResized

Event Type

SizeChanged