Class HeadlessDialogPanel
Namespace: Neon.Tailwind
Assembly: Neon.Tailwind.dll
Syntax
public class HeadlessDialogPanel : ComponentBase
Fields
rootElement
Declaration
public HtmlElement rootElement
Field Value
Type | Description |
---|---|
HtmlElement |
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> |
CascadedDialog
The cascaded HeadlessDialog.
Declaration
[CascadingParameter]
public HeadlessDialog CascadedDialog { get; set; }
Property Value
Type | Description |
---|---|
HeadlessDialog |
ChildContent
The styled Dialog panel.
Declaration
[Parameter]
public RenderFragment<HeadlessDialogPanel> ChildContent { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<HeadlessDialogPanel> |
Id
The container ID.
Declaration
[Parameter]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string |
IsEnabled
Whether the dialog panel is enabled.
Declaration
[Parameter]
public bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsVisible
Whether the dialog panel is visible.
Declaration
[Parameter]
public bool IsVisible { get; set; }
Property Value
Type | Description |
---|---|
bool |
OnClose
Callback that is called when the dialog is closed.
Declaration
[Parameter]
public EventCallback OnClose { get; set; }
Property Value
Type | Description |
---|---|
EventCallback |
OnOpen
Callback that is called when the dialog is opened.
Declaration
[Parameter]
public EventCallback OnOpen { get; set; }
Property Value
Type | Description |
---|---|
EventCallback |
Show
Whether the panel should be initially shown.
Declaration
[Parameter]
public bool Show { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
Close()
Declaration
public Task Close()
Returns
Type | Description |
---|---|
Task |
Dispose()
Declaration
public void Dispose()
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. |
FocusAsync()
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.
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
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
Task | A Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
Task | A Task representing any asynchronous operation. |
Overrides
Open()
Declaration
public Task Open()
Returns
Type | Description |
---|---|
Task |
SetParametersAsync(ParameterView)
Sets parameters supplied by the component's parent in the render tree.
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task | A Task that completes when the component has finished updating and rendering itself. |
Overrides
Remarks
Parameters are passed when SetParametersAsync(ParameterView) is called. It is not required that the caller supply a parameter value for all of the parameters that are logically understood by the component.
The default implementation of SetParametersAsync(ParameterView) will set the value of each property decorated with ParameterAttribute or CascadingParameterAttribute that has a corresponding value in the ParameterView. Parameters that do not have a corresponding value will be unchanged.
Operators
implicit operator ElementReference(HeadlessDialogPanel)
Declaration
public static implicit operator ElementReference(HeadlessDialogPanel element)
Parameters
Type | Name | Description |
---|---|---|
HeadlessDialogPanel | element |
Returns
Type | Description |
---|---|
ElementReference |