Class IntersectionObserver
Inheritance
IntersectionObserver
Assembly: Neon.Blazor.dll
Syntax
public class IntersectionObserver : ComponentBase
Properties
BoundingClientRect
Declaration
public DOMRectReadOnly BoundingClientRect { get; }
Property Value
ChildContent
Declaration
[Parameter]
public RenderFragment<IntersectionObserverContext> ChildContent { get; set; }
Property Value
Class
Declaration
[Parameter]
public string Class { get; set; }
Property Value
DocumentQuery
Declaration
[Parameter]
public string DocumentQuery { get; set; }
Property Value
Id
Declaration
[Parameter]
public string Id { get; set; }
Property Value
IsIntersecting
Declaration
public bool IsIntersecting { get; }
Property Value
IsVisible
Declaration
public bool IsVisible { get; }
Property Value
JS
Declaration
[Inject]
public IJSRuntime JS { get; set; }
Property Value
OnIntersectionChanged
Declaration
[Parameter]
public EventCallback<IntersectionChangedEventArgs> OnIntersectionChanged { get; set; }
Property Value
Ratio
Declaration
public double Ratio { get; }
Property Value
RootMargin
Declaration
[Parameter]
public string RootMargin { get; set; }
Property Value
ServiceProvider
Declaration
[Inject]
public IServiceProvider ServiceProvider { get; set; }
Property Value
Threshold
Declaration
[Parameter]
public double[] Threshold { get; set; }
Property Value
rootElement
Declaration
protected HtmlElement rootElement { get; set; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
Declaration
public ValueTask DisposeAsync()
Returns
Type |
Description |
ValueTask |
A task that represents the asynchronous dispose operation.
|
OnAfterRenderAsync(bool)
Method invoked after each time the component has been rendered interactively and the UI has finished
updating (for example, after elements have been added to the browser DOM). Any ElementReference
fields will be populated by the time this runs.
This method is not invoked during prerendering or server-side rendering, because those processes
are not attached to any live browser DOM and are already complete before the DOM is updated.
Note that the component does not automatically re-render after the completion of any returned Task,
because that would cause an infinite render loop.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type |
Name |
Description |
bool |
firstRender |
Set to true if this is the first time OnAfterRender(bool) has been invoked
on this component instance; otherwise false .
|
Returns
Type |
Description |
Task |
A Task representing any asynchronous operation.
|
Overrides
OnInitialized()
Method invoked when the component is ready to start, having received its
initial parameters from its parent in the render tree.
Declaration
protected override void OnInitialized()
Overrides
OnSetElementReference(ElementReference)
Set the element reference.
Declaration
public void OnSetElementReference(ElementReference reference)
Parameters
Events
IntersectionChanged
Declaration
public event Action IntersectionChanged
Event Type