DialogBuilder

Properties

WriteAction - Func

Methods

Animation(System.Action)

Configures the animation effects of the panelbar.

Parameters

animationAction - System.Action<PopupAnimationBuilder>

The action that configures the animation.

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Animation(animation => animation.Open(open => open.Duration(700)))
            )
             

Animation(System.Boolean)

Configures the animation effects of the window.

Parameters

enable - System.Boolean

Whether the component animation is enabled.

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Animation(false)
            )
             

Title(System.Boolean)

Allows title to be shown / hidden

Parameters

show - System.Boolean

The value that configures the visibility of the title.

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Title(false)
            )
             

Title(System.String)

Sets title, which appears in the header of the dialog.

Parameters

title - System.String

The value that configures the title of the dialog.

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Title("Dialog title")
            )
             

Modal(System.Action)

Specifies whether the dialog should show a modal overlay over the page.

Parameters

configurator - System.Action<DialogModalSettingsBuilder>

The configurator for the modal setting.

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Modal(modal => modal.PreventScroll(true))
            )
             

Modal(System.Boolean)

Specifies whether the dialog should show a modal overlay over the page.

Parameters

enabled - System.Boolean

Enables or disables the modal option.

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Modal(true)
            )
             

Height(System.Double)

Specifies height of the dialog.

Parameters

value - System.Double

The value for Height

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Dialog()
                 .Name("Dialog")
                 .Visible(true)
                 .Content("Dialog content")
                 .Height(300)
            )
             

MaxHeight(System.Double)

The maximum height (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.Double

The value for MaxHeight

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .MaxHeight(500)
            )
             

MaxWidth(System.Double)

The maximum width (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.Double

The value for MaxWidth

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .MaxWidth(800)
            )
             

MinHeight(System.Double)

The minimum height (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.Double

The value for MinHeight

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .MinHeight(200)
            )
             

MinWidth(System.Double)

The minimum width (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.Double

The value for MinWidth

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .MinWidth(400)
            )
             

Width(System.Double)

Specifies width of the dialog.

Parameters

value - System.Double

The value for Width

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .Width(700)
            )
             

Height(System.String)

Specifies height of the dialog.

Parameters

value - System.String

The value for Height

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .Height("300px")
            )
             

MaxHeight(System.String)

The maximum height (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.String

The value for MaxHeight

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .MaxHeight("500px")
            )
             

MaxWidth(System.String)

The maximum width (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.String

The value for MaxWidth

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .MaxWidth("800px")
            )
             

MinHeight(System.String)

The minimum height (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.String

The value for MinHeight

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .MinHeight("200px")
            )
             

MinWidth(System.String)

The minimum width (in pixels) that may be achieved by resizing the dialog.

Parameters

value - System.String

The value for MinWidth

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .MinWidth("300px")
            )
             

Width(System.String)

Specifies width of the dialog.

Parameters

value - System.String

The value for Width

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
             @(Html.Kendo().Window()
                .Name("window")
                .Visible(true)
                .Content("Window Content")
                .MaxHeight("600px")
            )
             

Content(System.Func)

Specifies width of the dialog.

Parameters

value - System.Func<Object,Object>

The value for Width

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
                 @(Html.Kendo().Dialog()
                    .Name("dialog")
                    .Visible(true)
                    .Content(<text>Some Content</text>)
                )
             

Content(System.Action)

Specifies width of the dialog.

Parameters

action - System.Action

RETURNS

A DialogBuilder instance for method chaining.

Example

Razor
 
                 @(Html.Kendo().Dialog()
                    .Name("dialog")
                    .Visible(true)
                    .Content(() =>
                     {
                          <strong>Dialog content</strong>
                     })
                )
             

Actions(System.Action)

A collection of objects containing text, action and primary attributes used to specify the dialog buttons. #### Example

Parameters

configurator - System.Action<DialogActionFactory>

The configurator for the actions setting.

RETURNS

Returns the current instance of DialogBuilder .

ButtonLayout(System.String)

Specifies the possible layout of the action buttons in the Dialog.Note: Stretched layout has no effect in browsers, like IE9, that do not support flexbox.Possible values are: normal or stretched.

Parameters

value - System.String

The value for ButtonLayout

RETURNS

Returns the current DialogBuilder instance.

Closable(System.Boolean)

Specifies whether a close button should be rendered at the top corner of the dialog.

Parameters

value - System.Boolean

The value for Closable

RETURNS

Returns the current DialogBuilder instance.

Messages(System.Action)

Defines the text of the labels that are shown within the dialog. Used primarily for localization.

Parameters

configurator - System.Action<DialogMessagesSettingsBuilder>

The configurator for the messages setting.

RETURNS

Returns the current instance of DialogBuilder .

ThemeColor(System.String)

The themeColor option controls the color that will be applied.The following values are available for the themeColor: primary; dark; light or none.

Parameters

value - System.String

The value for ThemeColor

RETURNS

Returns the current DialogBuilder instance.

Visible(System.Boolean)

Specifies whether the dialog will be initially visible.

Parameters

value - System.Boolean

The value for Visible

RETURNS

Returns the current DialogBuilder instance.

Size(System.String)

Set predefined size to the dialog. The width and height configuration options override the predefined size.Possible values are: auto; small; medium or large.

Parameters

value - System.String

The value for Size

RETURNS

Returns the current DialogBuilder instance.

Content(System.String)

The content of the dialog

Parameters

value - System.String

The value for Content

RETURNS

Returns the current DialogBuilder instance.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<DialogEventBuilder>

The client events action.

RETURNS

Returns the current DialogBuilder instance.

Example

Razor
 
            @(Html.Kendo().Dialog()
                  .Name("Dialog")
                  .Events(events => events
                      .Close("onClose")
                  )
            )
             

ToComponent()

Returns the internal view component.

RETURNS

The instance that represents the component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

RETURNS

Returns the current instance.

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

RETURNS

Returns the current instance.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

RETURNS

Returns the current instance.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

RETURNS

Returns a DeferredWidgetBuilder instance.

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

RETURNS

Returns the current instance.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

RETURNS

Returns the current instance.

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

Render()

Renders the component in place.

ToHtmlString()

Returns the HTML representation of the component.

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

Returns the client template for the component.

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

RETURNS

Returns the current instance.