Inheritance
System.Object
DialogBuilder
Assembly: Syncfusion.EJ2.dll
public class DialogBuilder : ControlBuilder
Constructors
Declaration
Declaration
public DialogBuilder(Dialog model)
Parameters
Type |
Name |
Description |
Dialog |
model |
|
Fields
Declaration
Field Value
Properties
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
Specifies the value whether the dialog component can be dragged by the end-user.
The dialog allows to drag by selecting the header and dragging it for re-position the dialog.
Declaration
public DialogBuilder AllowDragging(bool allowDragging = true)
Parameters
Type |
Name |
Description |
System.Boolean |
allowDragging |
|
Returns
Specifies the animation settings of the dialog component.
The animation effect can be applied on open and close the dialog with duration and delay.
Declaration
public DialogBuilder AnimationSettings(DialogAnimationSettings animationSettings)
Parameters
Returns
Declaration
public DialogBuilder AnimationSettings(Action<DialogAnimationSettingsBuilder> animationSettings)
Parameters
Returns
Event triggers before the dialog is closed.
If you cancel this event, the dialog remains opened.
Set the cancel argument to true to cancel the closure of a dialog.
Declaration
public DialogBuilder BeforeClose(string beforeClose)
Parameters
Type |
Name |
Description |
System.String |
beforeClose |
|
Returns
Event triggers when the dialog is being opened.
If you cancel this event, the dialog remains closed.
Set the cancel argument to true to cancel the open of a dialog.
Declaration
public DialogBuilder BeforeOpen(string beforeOpen)
Parameters
Type |
Name |
Description |
System.String |
beforeOpen |
|
Returns
Event triggers before sanitize the value.
Declaration
public DialogBuilder BeforeSanitizeHtml(string beforeSanitizeHtml)
Parameters
Type |
Name |
Description |
System.String |
beforeSanitizeHtml |
|
Returns
Declaration
public DialogBuilder Buttons(Action<DialogDialogButtonBuilder> buttons)
Parameters
Returns
Configures the action buttons
that contains button properties with primary attributes and click events.
One or more action buttons can be configured to the dialog.
Declaration
public DialogBuilder Buttons(List<DialogDialogButton> buttons)
Parameters
Returns
Event triggers after the dialog has been closed.
Declaration
public DialogBuilder Close(string close)
Parameters
Type |
Name |
Description |
System.String |
close |
|
Returns
Specifies the boolean value whether the dialog can be closed with the escape key
that is used to control the dialog's closing behavior.
Declaration
public DialogBuilder CloseOnEscape(bool closeOnEscape = true)
Parameters
Type |
Name |
Description |
System.Boolean |
closeOnEscape |
|
Returns
Specifies the value that can be displayed in dialog's content area.
It can be information, list, or other HTML elements.
The content of dialog can be loaded with dynamic data such as database, AJAX content, and more.
Declaration
public DialogBuilder Content(string content)
Parameters
Type |
Name |
Description |
System.String |
content |
|
Returns
Declaration
public DialogBuilder ContentTemplate(Action<object> template)
Parameters
Type |
Name |
Description |
System.Action<System.Object> |
template |
|
Returns
Declaration
public DialogBuilder ContentTemplate(Func<object, object> template)
Parameters
Type |
Name |
Description |
System.Func<System.Object, System.Object> |
template |
|
Returns
Event triggers when the dialog is created.
Declaration
public DialogBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
Specifies the CSS class name that can be appended with root element of the dialog.
One or more custom CSS classes can be added to a dialog.
Declaration
public DialogBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Event triggers when the dialog is destroyed.
Declaration
public DialogBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
Event triggers when the user drags the dialog.
Declaration
public DialogBuilder Drag(string drag)
Parameters
Type |
Name |
Description |
System.String |
drag |
|
Returns
Event triggers when the user begins dragging the dialog.
Declaration
public DialogBuilder DragStart(string dragStart)
Parameters
Type |
Name |
Description |
System.String |
dragStart |
|
Returns
Event triggers when the user stop dragging the dialog.
Declaration
public DialogBuilder DragStop(string dragStop)
Parameters
Type |
Name |
Description |
System.String |
dragStop |
|
Returns
Defines whether to allow the cross-scripting site or not.
Declaration
public DialogBuilder EnableHtmlSanitizer(bool enableHtmlSanitizer = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableHtmlSanitizer |
|
Returns
Enables or disables the persistence of the dialog's dimensions and position state between page reloads.
Declaration
public DialogBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
Specifies the value whether the dialog component can be resized by the end-user.
If enableResize is true, the dialog component creates grip to resize it diagonal direction.
Declaration
public DialogBuilder EnableResize(bool enableResize = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableResize |
|
Returns
Enable or disable rendering component in right to left direction.
Declaration
public DialogBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
Specifies the template value that can be displayed with dialog's footer area.
This is optional property and can be used only when the footer is occupied with information or custom components.
By default, the footer is configured with action buttons.
If footer template is configured to dialog, the action buttons property will be disabled.
Declaration
public DialogBuilder FooterTemplate(string footerTemplate)
Parameters
Type |
Name |
Description |
System.String |
footerTemplate |
|
Returns
Specifies the value that can be displayed in the dialog's title area that can be configured with plain text or HTML elements.
This is optional property and the dialog can be displayed without header, if the header property is null.
Declaration
public DialogBuilder Header(string header)
Parameters
Type |
Name |
Description |
System.String |
header |
|
Returns
Specifies the height of the dialog component.
Declaration
public DialogBuilder Height(double height)
Parameters
Type |
Name |
Description |
System.Double |
height |
|
Returns
Specifies the height of the dialog component.
Declaration
public DialogBuilder Height(string height)
Parameters
Type |
Name |
Description |
System.String |
height |
|
Returns
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public DialogBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
Specifies the Boolean value whether the dialog can be displayed as modal or non-modal.
Modal
: It creates overlay that disable interaction with the parent application and user should
respond with modal before continuing with other applications.
Modeless
: It does not prevent user interaction with parent application.
Declaration
public DialogBuilder IsModal(bool isModal = true)
Parameters
Type |
Name |
Description |
System.Boolean |
isModal |
|
Returns
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public DialogBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
Specify the min-height of the dialog component.
Declaration
public DialogBuilder MinHeight(double minHeight)
Parameters
Type |
Name |
Description |
System.Double |
minHeight |
|
Returns
Specify the min-height of the dialog component.
Declaration
public DialogBuilder MinHeight(string minHeight)
Parameters
Type |
Name |
Description |
System.String |
minHeight |
|
Returns
Event triggers when a dialog is opened.
Declaration
public DialogBuilder Open(string open)
Parameters
Type |
Name |
Description |
System.String |
open |
|
Returns
Event triggers when the overlay of dialog is clicked.
Declaration
public DialogBuilder OverlayClick(string overlayClick)
Parameters
Type |
Name |
Description |
System.String |
overlayClick |
|
Returns
Specifies the value where the dialog can be positioned within the document or target.
The position can be represented with pre-configured positions or specific X and Y values.
X value
: left, center, right, or offset value.
Y value
: top, center, bottom, or offset value.
Declaration
public DialogBuilder Position(DialogPositionData position)
Parameters
Returns
Declaration
public DialogBuilder Position(Action<DialogPositionDataBuilder> position)
Parameters
Returns
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
ResizeHandles(Object)
Specifies the resize handles direction in the dialog component that can be resized by the end-user.
Declaration
public DialogBuilder ResizeHandles(object resizeHandles)
Parameters
Type |
Name |
Description |
System.Object |
resizeHandles |
|
Returns
Event triggers when the user begins to resize a dialog.
Declaration
public DialogBuilder ResizeStart(string resizeStart)
Parameters
Type |
Name |
Description |
System.String |
resizeStart |
|
Returns
Event triggers when the user stop to resize a dialog.
Declaration
public DialogBuilder ResizeStop(string resizeStop)
Parameters
Type |
Name |
Description |
System.String |
resizeStop |
|
Returns
Event triggers when the user resize the dialog.
Declaration
public DialogBuilder Resizing(string resizing)
Parameters
Type |
Name |
Description |
System.String |
resizing |
|
Returns
Specifies the value that represents whether the close icon is shown in the dialog component.
Declaration
public DialogBuilder ShowCloseIcon(bool showCloseIcon = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showCloseIcon |
|
Returns
Specifies the target element in which to display the dialog.
The default value is null, which refers the document.body
element.
Declaration
public DialogBuilder Target(string target)
Parameters
Type |
Name |
Description |
System.String |
target |
|
Returns
Specifies the value that represents whether the dialog component is visible.
Declaration
public DialogBuilder Visible(bool visible = true)
Parameters
Type |
Name |
Description |
System.Boolean |
visible |
|
Returns
Specifies the width of the dialog.
Declaration
public DialogBuilder Width(double width)
Parameters
Type |
Name |
Description |
System.Double |
width |
|
Returns
Specifies the width of the dialog.
Declaration
public DialogBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns
Specifies the z-order for rendering that determines whether the dialog is displayed in front or behind of another component.
Declaration
public DialogBuilder ZIndex(double zIndex)
Parameters
Type |
Name |
Description |
System.Double |
zIndex |
|
Returns