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

WindowBuilder

Properties

WriteAction - Func

Methods

Actions(System.Action)

Configures the window buttons.

Parameters

actionsBuilderAction - System.Action<WindowActionsBuilder>

The buttons configuration action.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Actions(actions =>
                            actions.Close()
                        )
            )

Draggable(System.Action)

Enables (true) or disables (false) the ability for users to move/drag the widget.

Parameters

configurator - System.Action<WindowDraggableSettingsBuilder>

The configurator for the draggable setting.

Draggable(System.Boolean)

Enables (true) or disables (false) the ability for users to move/drag the widget.

Parameters

enabled - System.Boolean

Enables or disables the draggable option.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Draggable(true)
            )

Animation(System.Action)

Configures the animation effects of the panelbar.

Parameters

animationAction - System.Action<PopupAnimationBuilder>

The action that configures the animation.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Animation(animation => animation.Close(close => close.Duration(600)))
            )

Animation(System.Boolean)

Configures the animation effects of the window.

Parameters

enable - System.Boolean

Whether the component animation is enabled.

Example


            @(Html.Kendo().Window()
                        .Name("Window")
                        .Animation(false)
            )

Title(System.Action)

The text in the window title bar. If false, the window will be displayed without a title bar. Note that this will prevent the window from being dragged, and the window titlebar buttons will not be shown.

Parameters

configurator - System.Action<WindowTitleSettingsBuilder>

The configurator for the title setting.

Example


             @(Html.Kendo().Window()
                       .Name("Window")
                       .Title(t => t.Text("My Title")) 
            )

Title(System.Boolean)

Allows title to be shown / hidden

Parameters

show - System.Boolean

Whether the window title will be visible

Example


             @(Html.Kendo().Window()
                       .Name("Window")
                       .Title(true) 
            )

Title(System.String)

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

Parameters

title - System.String

The title.

Example


             @(Html.Kendo().Window()
                       .Name("Window")
                       .Title("My title") 
            )

Modal(System.Action)

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

Parameters

configurator - System.Action<WindowModalSettingsBuilder>

The configurator for the modal setting.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Modal(m => m.PreventScroll(true))
            )

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

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Modal(m => m.PreventScroll(true))
            )

Modal(System.Boolean)

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

Parameters

enabled - System.Boolean

Enables or disables the modal option.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Modal(true)
            )

AppendTo(System.String)

Defines a selector for the element to which the Window will be appended. By default this is the page body.

Parameters

selector - System.String

A selector of the Window container

Example


             @(Html.Kendo().Window()
                       .Name("Window")
                       .AppendTo(".container") 
            )

Content(System.Action)

Sets the HTML content which the window should display.

Parameters

value - System.Action

The action which renders the content.

Example


             @(Html.Kendo().Window()
                       .Name("Window")
                       .Content(() => 
                       { 
                                <strong>Window content</strong>
                       })
            )

Content(System.Func)

Sets the HTML content which the window should display

Parameters

value - System.Func<Object,Object>

The Razor inline template

Example


             @(Html.Kendo().Window()
                       .Name("Window")
                       .Content(@<strong> Hello World!</strong>))

Content(System.String)

Sets the HTML content which the item should display as a string.

Parameters

value - System.String

The action which renders the content.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Content("<strong> First Item Content</strong>")
            )

Draggable()

Enables (true) or disables (false) the ability for users to move/drag the widget.

LoadContentFrom(Microsoft.AspNetCore.Routing.RouteValueDictionary)

Sets the Url, which will be requested to return the content.

Parameters

routeValues - Microsoft.AspNetCore.Routing.RouteValueDictionary

The route values of the Action method.

Example


             @(Html.Kendo().Window()
                    .Name("Window")
                    .LoadContentFrom(MVC.Home.Index().GetRouteValueDictionary());
            )

LoadContentFrom(System.String,System.String)

Sets the Url, which will be requested to return the content.

Parameters

actionName - System.String

The action name.

controllerName - System.String

The controller name.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .LoadContentFrom("AjaxView_OpenSource", "Window")
            )

LoadContentFrom(System.String,System.String,System.Object)

Sets the Url, which will be requested to return the content.

Parameters

actionName - System.String

The action name.

controllerName - System.String

The controller name.

routeValues - System.Object

Route values.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .LoadContentFrom("AjaxView_OpenSource", "Window", new { id = 10})
            )

LoadContentFrom(System.String,System.String,Microsoft.AspNetCore.Routing.RouteValueDictionary)

Sets the Url, which will be requested to return the content.

Parameters

actionName - System.String

The action name.

controllerName - System.String

The controller name.

routeValues - Microsoft.AspNetCore.Routing.RouteValueDictionary

Route values.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .LoadContentFrom("AjaxView_OpenSource", "Window", new RouteValueDictionary { { "param1", "1" }, { "param2", "2" } })
            )

LoadContentFrom(System.String)

Sets the Url, which will be requested to return the content.

Parameters

value - System.String

The url.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .LoadContentFrom(Url.Action("AjaxView_OpenSource", "Window"))
            )

Resizable()

Enables windows resizing.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Resizable()
            )

Resizable(System.Action)

Configures the resizing ability of the window.

Parameters

resizingSettingsAction - System.Action<WindowResizingSettingsBuilder>

Resizing settings action.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Resizable(settings =>
                            settings.Enabled(true)
                        )
            )

Height(System.Double)

Specifies the height of the Window.

Parameters

value - System.Double

The value for Height

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Height(500)
            )

MaxHeight(System.Double)

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

Parameters

value - System.Double

The value for MaxHeight

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .MaxHeight(500)
            )

MaxWidth(System.Double)

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

Parameters

value - System.Double

The value for MaxWidth

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .MaxWidth(500)
            )

MinHeight(System.Double)

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

Parameters

value - System.Double

The value for MinHeight

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .MinHeight(200)
            )

MinWidth(System.Double)

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

Parameters

value - System.Double

The value for MinWidth

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .MinWidth(400)
            )

Width(System.Double)

Specifies the width of the Window.

Parameters

value - System.Double

The value for Width

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Width(600)
            )

Height(System.String)

Specifies the height of the Window.

Parameters

value - System.String

The value for Height

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Height("500")
            )

MaxHeight(System.String)

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

Parameters

value - System.String

The value for MaxHeight

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .MaxHeight("600")
            )

MaxWidth(System.String)

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

Parameters

value - System.String

The value for MaxWidth

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .MaxWidth("800")
            )

MinHeight(System.String)

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

Parameters

value - System.String

The value for MinHeight

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .MinHeight("300")
            )

MinWidth(System.String)

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

Parameters

value - System.String

The value for MinWidth

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .MinWidth("800")
            )

Width(System.String)

Specifies the width of the Window.

Parameters

value - System.String

The value for Width

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Width("600")
            )

Position(System.Action)

A collection of one or two members which define the initial top and/or left position of the Window or the position of the containment element on the page.

Parameters

configurator - System.Action<WindowPositionSettingsBuilder>

The configurator for the position setting.

Example


             @(Html.Kendo().Window()
                        .Name("Window")
                        .Position(settings =>
                            settings.Top(100).Left(100)
                        )
            )

AutoFocus(System.Boolean)

Determines whether the Window will be focused automatically when opened. The property also influences the focus behavior when an already opened Window is clicked.

Parameters

value - System.Boolean

The value for AutoFocus

Iframe(System.Boolean)

Explicitly states whether a content iframe will be created. For more information, refer to the documentation on using iframes.

Parameters

value - System.Boolean

The value for Iframe

Pinned(System.Boolean)

Specifies whether the Window will be pinned, that is, that it will not move together with the page content during scrolling.

Parameters

value - System.Boolean

The value for Pinned

Pinned()

Specifies whether the Window will be pinned, that is, that it will not move together with the page content during scrolling.

Scrollable(System.Boolean)

Enables (true) or disables (false) the scrolling of the Window contents.

Parameters

value - System.Boolean

The value for Scrollable

Visible(System.Boolean)

Specifies whether the Window will be initially visible.

Parameters

value - System.Boolean

The value for Visible

Size(System.String)

Sets a predefined size to the Window. The width and height configuration options override the predefined size.The supported values are: auto; small; medium or large.

Parameters

value - System.String

The value for Size

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<WindowEventBuilder>

The client events action.

Example


            @(Html.Kendo().Window()
                  .Name("Window")
                  .Events(events => events
                      .Activate("onActivate")
                  )
            )

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.

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.

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.

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

AsModule(System.Boolean)

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

Parameters

value - System.Boolean
In this article
Not finding the help you need?