Class MBDialog
This is a general purpose Material Theme dialog.
Assembly: Material.Blazor.dll
Syntax
public class MBDialog : ComponentFoundation, IDisposable
Properties
|
Improve this Doc
View Source
Body
Render fragment for the dialog body.
Declaration
public RenderFragment Body { get; set; }
Property Value
Type |
Description |
RenderFragment |
|
|
Improve this Doc
View Source
Render fragment for the dialog buttons. Note that the dialog will
return actions to the consumer when the data-mdc-dialog-action
attribute
is set for a button: MBButton does this via its DialogAction
parameter.
Declaration
public RenderFragment Buttons { get; set; }
Property Value
Type |
Description |
RenderFragment |
|
|
Improve this Doc
View Source
Render fragment for the dialog custom header. This is outside of the Material Theme spec and is a "Plus" feature.
Declaration
public RenderFragment CustomHeader { get; set; }
Property Value
Type |
Description |
RenderFragment |
|
|
Improve this Doc
View Source
EscapeKeyAction
The action returned by the dialog when the escape key is pressed. Defaults to "close". Setting
this to "" will disable the escape key action.
Declaration
public string EscapeKeyAction { get; set; }
Property Value
|
Improve this Doc
View Source
OverflowVisible
Dialogs by default apply overflow: hidden;
. This means that selects or datepickers are often
cropped. Set this parameter to true to make the dialog apply overflow: visible;
to rectify this.
Defaults to false.
Declaration
public bool OverflowVisible { get; set; }
Property Value
|
Improve this Doc
View Source
ScrimClickAction
The action returned by the dialog when the scrim is clicked. Defaults to "close". Setting
this to "" will disable scrim click action.
Declaration
public string ScrimClickAction { get; set; }
Property Value
|
Improve this Doc
View Source
Title
Declaration
public string Title { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
Boolean |
disposing |
|
Overrides
|
Improve this Doc
View Source
HideAsync()
Hides the dialog first by allowing Material Theme to close it gracefully, then
removing the Blazor markup.
Declaration
public async Task HideAsync()
Returns
|
Improve this Doc
View Source
NotifyClosed(String)
Do not use. This method is used internally for receiving the "dialog closed" event from javascript.
Declaration
public async Task NotifyClosed(string reason)
Parameters
Type |
Name |
Description |
String |
reason |
|
Returns
|
Improve this Doc
View Source
NotifyOpened()
Do not use. This method is used internally for receiving the "dialog opened" event from javascript.
Declaration
public void NotifyOpened()
|
Improve this Doc
View Source
OnAfterRenderAsync(Boolean)
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Parameters
Type |
Name |
Description |
Boolean |
firstRender |
|
Returns
Overrides
|
Improve this Doc
View Source
OnInitializedAsync()
Declaration
protected override async Task OnInitializedAsync()
Returns
|
Improve this Doc
View Source
ShowAsync()
Shows the dialog. This first renders the Blazor markup and then allows
Material Theme to open the dialog, subsequently intiating all embedded Blazor components.
Declaration
public async Task<string> ShowAsync()
Returns
Type |
Description |
Task<String> |
The action string resulting form dialog closure
|
Implements