Base class to simplify custom modal dialog implementation.
Use HxModal with @ref="modal"
inside the dialog. See demo.
@inherits HxDialogBase<int>
<HxModal Title="What is on your dice?" @ref="modal"> @* @ref="modal" is required by HxDialogBase<> *@
<BodyTemplate>
<HxButton Text="1" Color="ThemeColor.Secondary" OnClick="async () => await HideAsync(1)" />
<HxButton Text="2" Color="ThemeColor.Secondary" OnClick="async () => await HideAsync(2)" />
<HxButton Text="3" Color="ThemeColor.Secondary" OnClick="async () => await HideAsync(3)" />
<HxButton Text="4" Color="ThemeColor.Secondary" OnClick="async () => await HideAsync(4)" />
<HxButton Text="5" Color="ThemeColor.Secondary" OnClick="async () => await HideAsync(5)" />
<HxButton Text="6" Color="ThemeColor.Secondary" OnClick="async () => await HideAsync(6)" />
</BodyTemplate>
<FooterTemplate>
<HxButton Text="Close" Color="ThemeColor.Secondary" OnClick="async () => await HideAsCancelledAsync()" />
</FooterTemplate>
</HxModal>
Method | Returns | Description |
---|---|---|
ShowAsync() | Task<DialogResult<TResult>> |
Shows the modal and waits until it is hidden. |