Class SwipeHandler
Namespace: Neon.Blazor
Assembly: Neon.Blazor.dll
Syntax
public class SwipeHandler : ComponentBase
Properties
AdditionalAttributes
Additional HTML attributes to be applied to the RenderFragment.
Declaration
[Parameter(CaptureUnmatchedValues = true)]
public IReadOnlyDictionary<string, object> AdditionalAttributes { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, object> |
ChildContent
The styled Dialog panel.
Declaration
[Parameter]
public RenderFragment<SwipeHandler> ChildContent { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<SwipeHandler> |
Id
The element ID.
Declaration
[Parameter]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string |
OnSwipe
The callback to be called on swipe events.
Declaration
[Parameter]
public EventCallback<SwipeDirection> OnSwipe { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<SwipeDirection> |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
FocusAsync()
Focuses the touch handler.
Declaration
public ValueTask FocusAsync()
Returns
Type | Description |
---|---|
ValueTask |
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 |
Returns
Type | Description |
---|---|
Task | A Task representing any asynchronous operation. |
Overrides
Remarks
The OnAfterRender(bool) and OnAfterRenderAsync(bool) lifecycle methods
are useful for performing interop, or interacting with values received from @ref
.
Use the firstRender
parameter to ensure that initialization work is only performed
once.
Operators
implicit operator ElementReference(SwipeHandler)
The current element reference.
Declaration
public static implicit operator ElementReference(SwipeHandler element)
Parameters
Type | Name | Description |
---|---|---|
SwipeHandler | element |
Returns
Type | Description |
---|---|
ElementReference |