Class DialogPropertiesBuilder
Represents a class for DialogPropertiesBuilder which includes show on init, close on escape, enable modal, width, content URL, and content type properties.
Inheritance
System.Object
DialogPropertiesBuilder
Implements
System.Web.IHtmlString
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Syncfusion.EJ.dll
Syntax
public class DialogPropertiesBuilder : IPropertiesBuilder, IHtmlString
Constructors
DialogPropertiesBuilder()
Declaration
public DialogPropertiesBuilder()
DialogPropertiesBuilder(Dialog)
Declaration
public DialogPropertiesBuilder(Dialog dialog)
Parameters
Type |
Name |
Description |
Dialog |
dialog |
|
Fields
dialog
The Dialog control displays a Dialog window within a web page.
Declaration
Field Value
Methods
Adds action buttons like close, minimize, pin, maximize in the dialog header with array argument.
Declaration
public DialogPropertiesBuilder ActionButtons(List<string> iconAction)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.String> |
iconAction |
|
Returns
AjaxOptions(Action<jQueryAjaxOptionsBuilder>)
Specifies the settings option for ajax request.
Declaration
public DialogPropertiesBuilder AjaxOptions(Action<jQueryAjaxOptionsBuilder> ajaxOptions)
Parameters
Returns
AllowDraggable()
Enables or disables draggable.
Declaration
public DialogPropertiesBuilder AllowDraggable()
Returns
AllowDraggable(Boolean)
Enables or disables draggable with boolean argument.
Declaration
public DialogPropertiesBuilder AllowDraggable(bool draggable)
Parameters
Type |
Name |
Description |
System.Boolean |
draggable |
|
Returns
AllowKeyboardNavigation()
Enables or disables keyboard interaction.
Declaration
public DialogPropertiesBuilder AllowKeyboardNavigation()
Returns
AllowKeyboardNavigation(Boolean)
Declaration
public DialogPropertiesBuilder AllowKeyboardNavigation(bool allowKeyboardNavigation)
Parameters
Type |
Name |
Description |
System.Boolean |
allowKeyboardNavigation |
|
Returns
Animation(Action<AnimationBuilder>)
Customizes the Dialog widget animations. The Dialog widget can be animated while opening and closing the dialog. In order to customize animation effects, you need to set “enableAnimation” as true with object argument.
Declaration
public DialogPropertiesBuilder Animation(Action<AnimationBuilder> animation)
Parameters
Returns
Enable or Disable the Modal dialog background scroller.
Declaration
public DialogPropertiesBuilder BackgroundScroll()
Returns
allows the dialog Enable or Disable the Modal dialog background scroller with boolean argument.
Declaration
public DialogPropertiesBuilder BackgroundScroll(bool backgroundScroll)
Parameters
Type |
Name |
Description |
System.Boolean |
backgroundScroll |
|
Returns
ClientSideEvents(Action<DialogClientSideEventsBuilder>)
Specifies the Dialog ClientSideEvents
Declaration
public DialogPropertiesBuilder ClientSideEvents(Action<DialogClientSideEventsBuilder> clientSideEvents)
Parameters
Returns
The following property has depreciated, we have added 'tooltip' API to achieve this behavior.
Declaration
[Obsolete("The CloseIconTooltip property has been deprecated.Use 'Tooltip' instead of CloseIconTooltip")]
public DialogPropertiesBuilder CloseIconTooltip(string closeText)
Parameters
Type |
Name |
Description |
System.String |
closeText |
|
Returns
CloseOnEscape()
Closes the dialog widget on pressing the ESC key when its boolean value is set to true.
Declaration
public DialogPropertiesBuilder CloseOnEscape()
Returns
CloseOnEscape(Boolean)
Closes the dialog widget on pressing the ESC key when it is set to true with boolean argument.
Declaration
public DialogPropertiesBuilder CloseOnEscape(bool closeOnEscape)
Parameters
Type |
Name |
Description |
System.Boolean |
closeOnEscape |
|
Returns
Containment(String)
The selector for the container element. If the property is set, then dialog will append to the selected element and it is restricted to move only within the specified container element with string argument.
Declaration
public DialogPropertiesBuilder Containment(string containment)
Parameters
Type |
Name |
Description |
System.String |
containment |
|
Returns
Content(String)
The following property has depreciated, we have added 'Target' API to achieve this behavior.
Declaration
[Obsolete("The Content property has been deprecated.Use 'Target' instead of content ")]
public DialogPropertiesBuilder Content(string contentContainer)
Parameters
Type |
Name |
Description |
System.String |
contentContainer |
|
Returns
ContentTemplate(Action<Object>)
Specifies Content template.
The Content template for webform.
Declaration
public DialogPropertiesBuilder ContentTemplate(Action<object> contentTemplate)
Parameters
Type |
Name |
Description |
System.Action<System.Object> |
contentTemplate |
|
Returns
ContentTemplate(Func<Object, Object>)
Specifies Contents template.
The Content template for RazorView.
Declaration
public DialogPropertiesBuilder ContentTemplate(Func<object, object> contentTemplate)
Parameters
Type |
Name |
Description |
System.Func<System.Object, System.Object> |
contentTemplate |
|
Returns
ContentType(String)
Allows to loads the content in dialog at run time. The possible values are null, ajax, iframe and image.
Declaration
public DialogPropertiesBuilder ContentType(string content)
Parameters
Type |
Name |
Description |
System.String |
content |
|
Returns
ContentUrl(String)
Specifies the URL to load the dialog content (such as AJAX, image, and iframe). In order to load content from URL, you need to set contentType as ‘ajax’ or ‘iframe’ or ‘image’ with string argument.
Declaration
public DialogPropertiesBuilder ContentUrl(string loadUrl)
Parameters
Type |
Name |
Description |
System.String |
loadUrl |
|
Returns
CssClass(String)
The root class for the Dialog widget to customize the existing theme with string argument.
Declaration
public DialogPropertiesBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
EnableAnimation()
Enable or disables animation when the dialog's opened and closed buttons are clicked.
Declaration
public DialogPropertiesBuilder EnableAnimation()
Returns
EnableAnimation(Boolean)
Enable or disables animation when the dialog's opened and closed buttons are clicked with boolean argument.
Declaration
public DialogPropertiesBuilder EnableAnimation(bool enableAnimation)
Parameters
Type |
Name |
Description |
System.Boolean |
enableAnimation |
|
Returns
EnableAutoResize()
The following property has depreciated, Use 'IsResponsive' API to achieve this behavior.
Declaration
public DialogPropertiesBuilder EnableAutoResize()
Returns
EnableAutoResize(Boolean)
The following property has depreciated, Use 'IsResponsive' API to achieve this behavior.
Declaration
public DialogPropertiesBuilder EnableAutoResize(bool enableAutoResize)
Parameters
Type |
Name |
Description |
System.Boolean |
enableAutoResize |
|
Returns
Enabled()
Enables or disables the Dialog widget.
Declaration
public DialogPropertiesBuilder Enabled()
Returns
Enabled(Boolean)
Enables or disables the Dialog widget with boolean argument.
Declaration
public DialogPropertiesBuilder Enabled(bool enabled)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnableModal()
Enable or disables modal dialog. The modal dialog acts like a child window that is displayed on top of the main window/screen and disables the main window interaction until it is closed.
Declaration
public DialogPropertiesBuilder EnableModal()
Returns
EnableModal(Boolean)
Enable or disables modal dialog. The modal dialog acts like a child window that is displayed on top of the main window/screen and disables the main window interaction until it is closed with boolean argument.
Declaration
public DialogPropertiesBuilder EnableModal(bool modal)
Parameters
Type |
Name |
Description |
System.Boolean |
modal |
|
Returns
EnablePersistence()
Allows the current model values to be saved in local storage or browser cookies for state maintenance.
Declaration
public DialogPropertiesBuilder EnablePersistence()
Returns
EnablePersistence(Boolean)
Allows the current model values to be saved in local storage or browser cookies for state maintenance when it is set to true with boolean argument.
Declaration
public DialogPropertiesBuilder EnablePersistence(bool persist)
Parameters
Type |
Name |
Description |
System.Boolean |
persist |
|
Returns
EnableResize()
Allows the dialog to be resizable.The dialog cannot be resized less than the minimum height, width values and greater than the maximum height and width.
Declaration
[Obsolete("The EnableAutoResize property has been deprecated. Use 'IsResponsive' instead of EnableAutoResize")]
public DialogPropertiesBuilder EnableResize()
Returns
EnableResize(Boolean)
Allows the dialog to be resizable.The dialog cannot be resized less than the minimum height, width values and greater than the maximum height and width with boolean argument.
Declaration
public DialogPropertiesBuilder EnableResize(bool resizable)
Parameters
Type |
Name |
Description |
System.Boolean |
resizable |
|
Returns
EnableRTL()
Displays dialog content from right to left when it is set to true.
Declaration
public DialogPropertiesBuilder EnableRTL()
Returns
EnableRTL(Boolean)
Displays dialog content from right to left when it is set to true with boolean argument.
Declaration
public DialogPropertiesBuilder EnableRTL(bool rtl)
Parameters
Type |
Name |
Description |
System.Boolean |
rtl |
|
Returns
FaviconCSS(String)
The CSS class name to display the favicon in the dialog header. In order to display favicon, you need to set showHeader as true since the favicon will be displayed in the dialog header with string argument.
Declaration
public DialogPropertiesBuilder FaviconCSS(string customIconCss)
Parameters
Type |
Name |
Description |
System.String |
customIconCss |
|
Returns
Specifies the content to be displayed in dialog footer. Ensure that before setting up footer content, whether the showFooter set as true.
Declaration
public DialogPropertiesBuilder FooterTemplateId(string footerTemplateId)
Parameters
Type |
Name |
Description |
System.String |
footerTemplateId |
|
Returns
Height(Object)
Sets the height for the dialog widget. It accepts both string and integer values.The unit of integer type value is “px” with object argument.
Declaration
public DialogPropertiesBuilder Height(object height)
Parameters
Type |
Name |
Description |
System.Object |
height |
|
Returns
HtmlAttributes(IDictionary<String, Object>)
It allows to define the characteristics of the Dialog control. It will helps to extend the capability of an HTML element.with object argument.
Declaration
public DialogPropertiesBuilder HtmlAttributes(IDictionary<string, object> itemHtmlAttributes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
itemHtmlAttributes |
|
Returns
IsResponsive()
Enable or disables responsive behavior.
Declaration
public DialogPropertiesBuilder IsResponsive()
Returns
IsResponsive(Boolean)
Allows the dialog to Enable or disable responsive behavior with boolean argument.
Declaration
public DialogPropertiesBuilder IsResponsive(bool isResponsive)
Parameters
Type |
Name |
Description |
System.Boolean |
isResponsive |
|
Returns
Locale(String)
Set the localization culture for Dialog Widget with string argument.
Declaration
public DialogPropertiesBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
MaxHeight(Object)
Sets the maximum height for the dialog widget with object argument.
Declaration
public DialogPropertiesBuilder MaxHeight(object maxHeight)
Parameters
Type |
Name |
Description |
System.Object |
maxHeight |
|
Returns
MaxWidth(Object)
Sets the maximum width for the dialog widget with object argument.
Declaration
public DialogPropertiesBuilder MaxWidth(object maxWidth)
Parameters
Type |
Name |
Description |
System.Object |
maxWidth |
|
Returns
MinHeight(Object)
Sets the minimum height for the dialog widget with object argument.
Declaration
public DialogPropertiesBuilder MinHeight(object minHeight)
Parameters
Type |
Name |
Description |
System.Object |
minHeight |
|
Returns
MinWidth(Object)
Sets the minimum width for the dialog widget with object argument.
Declaration
public DialogPropertiesBuilder MinWidth(object minWidth)
Parameters
Type |
Name |
Description |
System.Object |
minWidth |
|
Returns
Position(Action<PositionBuilder>)
Displays the Dialog widget at the given X and Y axis position with object argument.
Declaration
public DialogPropertiesBuilder Position(Action<PositionBuilder> position)
Parameters
Returns
Render()
Declaration
Shows or hides the dialog footer.
Declaration
public DialogPropertiesBuilder ShowFooter()
Returns
allows the dialog to Show or hide the dialog footer with boolean argument.
Declaration
public DialogPropertiesBuilder ShowFooter(bool showFooter)
Parameters
Type |
Name |
Description |
System.Boolean |
showFooter |
|
Returns
Shows or hides the dialog header.
Declaration
public DialogPropertiesBuilder ShowHeader()
Returns
allows the dialog to Show or hide the dialog header with boolean argument.
Declaration
public DialogPropertiesBuilder ShowHeader(bool showHeader)
Parameters
Type |
Name |
Description |
System.Boolean |
showHeader |
|
Returns
ShowOnInit()
The Dialog widget can be rendered by default i.e. on initialization, when it is set to true with boolean argument.
Declaration
public DialogPropertiesBuilder ShowOnInit()
Returns
ShowOnInit(Boolean)
The Dialog widget can be autoOpened by default i.e. on initialization, when it is set to true with boolean argument.
Declaration
public DialogPropertiesBuilder ShowOnInit(bool autoOpen)
Parameters
Type |
Name |
Description |
System.Boolean |
autoOpen |
|
Returns
ShowRoundedCorner()
Enables or disables the rounded corner for dialog window.
Declaration
public DialogPropertiesBuilder ShowRoundedCorner()
Returns
ShowRoundedCorner(Boolean)
allows to Enables or disables the rounded corner for dialog window with boolean argument.
Declaration
public DialogPropertiesBuilder ShowRoundedCorner(bool roundedCorner)
Parameters
Type |
Name |
Description |
System.Boolean |
roundedCorner |
|
Returns
Target(String)
The selector for the container element. If this property is set, the dialog will be displayed (positioned) based on its container Position with string argument.
Declaration
public DialogPropertiesBuilder Target(string target)
Parameters
Type |
Name |
Description |
System.String |
target |
|
Returns
Title(String)
Specifies the text to be displayed in dialog header.Ensure that before setting up header title,whether the showHeader set as true.
Declaration
public DialogPropertiesBuilder Title(string title)
Parameters
Type |
Name |
Description |
System.String |
title |
|
Returns
ToHtmlString()
Returns an HTML-encoded string.
Declaration
public string ToHtmlString()
Returns
Type |
Description |
System.String |
|
Add or configure the tooltip text for actionButtons in the dialog header.
Declaration
public DialogPropertiesBuilder Tooltip(Action<DialogTooltipBuilder> tooltip)
Parameters
Returns
Width(Object)
Sets the Width for the dialog widget. It accepts both string and integer values. For example, it can accepts values like “auto”, “100%”, “100px” as string type and “100”, “500” as integer type. The unit of integer type value is “px” with object argument.
Declaration
public DialogPropertiesBuilder Width(object width)
Parameters
Type |
Name |
Description |
System.Object |
width |
|
Returns
ZIndex(Int32)
Sets the z-index value for the Dialog widget with int argument.
Declaration
public DialogPropertiesBuilder ZIndex(int zIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
zIndex |
|
Returns
Implements
System.Web.IHtmlString