New to Telerik UI for ASP.NET Core? Download free 30-day trial

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.

Example


             @(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.

Example


             @(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.

Example


             @(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.

Example


             @(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.

Example


             @(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.

Example


             @(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

Example


             @(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

Example


             @(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

Example


             @(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

Example


             @(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

Example


             @(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

Example


             @(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

Example


             @(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

Example


             @(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

Example


             @(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

Example


             @(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

Example


             @(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

Example


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

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.

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

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

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.

Visible(System.Boolean)

Specifies whether the dialog will be initially visible.

Parameters

value - System.Boolean

The value for Visible

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

Content(System.String)

The content of the dialog

Parameters

value - System.String

The value for Content

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<DialogEventBuilder>

The client events action.

Example


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

ToComponent()

Returns the internal view component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

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

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

Deferred(System.Boolean)

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

Parameters

deferred - System.Boolean

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

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

The HTML attributes.

Render()

Renders the component in place.

ToHtmlString()

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

Parameters

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

ToClientTemplate()

AsChildComponent()

Configures the widget as a child component.

In this article
Not finding the help you need?