Class DialogOptions
Provides options to configure built-in dialogs shown using ConfirmAsync(String, String, DialogOptions), AlertAsync(String, String, DialogOptions) and PromptAsync(String, String, DialogOptions) methods.
Inheritance
Namespace: Syncfusion.Blazor.Popups
Assembly: Syncfusion.Blazor.dll
Syntax
public class DialogOptions : Object
Constructors
DialogOptions()
Declaration
public DialogOptions()
Properties
AllowDragging
Gets or sets whether the dialog can be dragged by the end-user.
Declaration
public bool AllowDragging { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When AllowDragging is set as true it allows a user to drag by selecting the header and dragging it for repositioning the dialog.
AnimationSettings
Gets or sets the animation settings of the dialog component.
Declaration
public DialogAnimationOptions AnimationSettings { get; set; }
Property Value
Type | Description |
---|---|
DialogAnimationOptions |
Remarks
The animation effect can be applied to open and close the dialog with duration and delay.
CancelButtonOptions
Gets or sets the cancel action settings.
Declaration
public DialogButtonOptions CancelButtonOptions { get; set; }
Property Value
Type | Description |
---|---|
DialogButtonOptions |
See Also
ChildContent
Gets or sets a template content that used as content dialog.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | The template content. |
Examples
In the code example below, the child content is configured for the prompt dialog box.
await DialogService.PromptAsync(null, "Enter Your Details", new DialogOptions()
{
ChildContent = @<SfTextBox Placeholder = "Enter Name"></SfTextBox>
});
CloseOnEscape
Gets or sets whether the dialog can be closed by pressing the escape (ESC) key.
Declaration
public bool CloseOnEscape { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
See Also
CssClass
Gets or sets the CSS class name that can be appended with the root element of the utility dialog.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is |
Remarks
One or more custom CSS classes can be added to a utility dialog.
Height
Gets or sets the height of the dialog..
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is |
See Also
Position
Gets or sets the value where the utility dialog can be positioned within the document or target.
Declaration
public PositionDataModel Position { get; set; }
Property Value
Type | Description |
---|---|
PositionDataModel | The position can be represented with pre-configured positions or specific X and Y values.
|
PrimaryButtonOptions
Gets or sets the primary (OK) action button settings.
Declaration
public DialogButtonOptions PrimaryButtonOptions { get; set; }
Property Value
Type | Description |
---|---|
DialogButtonOptions |
See Also
ShowCloseIcon
Gets or sets whether to show the close icon in the title of dialog.
Declaration
public bool ShowCloseIcon { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
See Also
Width
Gets or sets the width of the dialog..
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is |
See Also
ZIndex
Gets or sets the z-order that determines whether the utility dialog is displayed in front or behind of another component.
Declaration
public int ZIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The |