Class
TelerikWindow

The class for the Telerik Window component.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikWindow : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikWindow

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Constructors

TelerikWindow()

Declaration

cs-api-definition
public TelerikWindow()

Properties

AnimationDuration

Sets the animation duration in milliseconds for show/hide effects. Shorter values (100-200ms) provide snappy animations, while longer values (500ms+) create smoother transitions. The default value is 300.

Declaration

cs-api-definition
[Parameter]
public int AnimationDuration { get; set; }

Property Value

int

AnimationType

Controls the animation effect when the Window appears or disappears. Options include Fade, ZoomIn, or None for no animation. The default value is None.

Declaration

cs-api-definition
[Parameter]
public WindowAnimationType AnimationType { get; set; }

Property Value

WindowAnimationType

CloseOnOverlayClick

Allows the modal Window to be closed when users click on the backdrop overlay. Only applies to modal windows where Modal is true. Provides an alternative way to close the window besides using action buttons.

Declaration

cs-api-definition
[Parameter]
public bool CloseOnOverlayClick { get; set; }

Property Value

bool

ContainmentSelector

Specifies a CSS selector for the element that will constrain the Window's movement. The window cannot be dragged outside the boundaries of the specified element. Cannot be used with Modal windows.

Declaration

cs-api-definition
[Parameter]
public string ContainmentSelector { get; set; }

Property Value

string

Draggable

Enables users to drag the Window by its titlebar to reposition it. Drag operation is constrained by ContainmentSelector if specified. The default value is true.

Declaration

cs-api-definition
[Parameter]
public bool Draggable { get; set; }

Property Value

bool

FooterLayoutAlign

Defines the layout of the content in the footer. Default value is Stretch. The possible options are Stretch, Start, End, Center.

Declaration

cs-api-definition
[Parameter]
public WindowFooterLayoutAlign FooterLayoutAlign { get; set; }

Property Value

WindowFooterLayoutAlign

Height

Defines the height of the Window as a CSS value. Supports units like px, %, em, rem, or viewport units (e.g., "300px", "40vh", "15em"). If not specified, the window uses content-based sizing.

Declaration

cs-api-definition
[Parameter]
public string Height { get; set; }

Property Value

string

HeightChanged

Fires when the height parameter has changed.

Declaration

cs-api-definition
[Parameter]
public EventCallback<string> HeightChanged { get; set; }

Property Value

EventCallback<string>

Id

The id of the window HTML element.

Declaration

cs-api-definition
[Parameter]
public string Id { get; set; }

Property Value

string

Left

Defines the left position of the Window relative to the viewport (where the TelerikRootComponent is declared). See Dimensions.

Declaration

cs-api-definition
[Parameter]
public string Left { get; set; }

Property Value

string

LeftChanged

Fires when the left parameter has changed.

Declaration

cs-api-definition
[Parameter]
public EventCallback<string> LeftChanged { get; set; }

Property Value

EventCallback<string>

MaxHeight

Sets the maximum height constraint for the Window as a CSS value. Prevents the window from being resized larger than this value (e.g., "600px", "80vh"). Useful for maintaining responsive layouts.

Declaration

cs-api-definition
[Parameter]
public string MaxHeight { get; set; }

Property Value

string

MaxWidth

Sets the maximum width constraint for the Window as a CSS value. Prevents the window from being resized larger than this value (e.g., "800px", "90vw"). Useful for maintaining responsive layouts.

Declaration

cs-api-definition
[Parameter]
public string MaxWidth { get; set; }

Property Value

string

MinHeight

Sets the minimum height constraint for the Window as a CSS value. Prevents the window from being resized smaller than this value (e.g., "150px", "10em"). When Resizable is true, defaults to "100px".

Declaration

cs-api-definition
[Parameter]
public string MinHeight { get; set; }

Property Value

string

MinWidth

Sets the minimum width constraint for the Window as a CSS value. Prevents the window from being resized smaller than this value (e.g., "200px", "15em"). When Resizable is true, defaults to "120px".

Declaration

cs-api-definition
[Parameter]
public string MinWidth { get; set; }

Property Value

string

Modal

Determines whether the Window displays as a modal dialog that blocks interaction with the rest of the page. When true, shows a backdrop overlay and traps focus within the window. Cannot be used with ContainmentSelector. The default value is false.

Declaration

cs-api-definition
[Parameter]
public bool Modal { get; set; }

Property Value

bool

PersistContent

Maintains the Window content in the DOM when minimized, preserving component state and user input. When false, content is removed from DOM during minimization, which may improve performance but loses state.

Declaration

cs-api-definition
[Parameter]
public bool PersistContent { get; set; }

Property Value

bool

Resizable

Enables users to resize the Window by dragging its edges or corners. Resize operation respects MinWidth, MinHeight, MaxWidth, and MaxHeight constraints. The default value is true.

Declaration

cs-api-definition
[Parameter]
public bool Resizable { get; set; }

Property Value

bool

Size

Specifies the Size of the Window. See Medium.

Declaration

cs-api-definition
[Parameter]
public string Size { get; set; }

Property Value

string

State

Controls the Window's display state and behavior. Options include Default, Minimized, or Maximized for different presentation modes.

Declaration

cs-api-definition
[Parameter]
public WindowState State { get; set; }

Property Value

WindowState

StateChanged

Fires when the State Parameter has changed.

Declaration

cs-api-definition
[Parameter]
public EventCallback<WindowState> StateChanged { get; set; }

Property Value

EventCallback<WindowState>

ThemeColor

Applies a theme color to the Window titlebar for visual emphasis. Accepts theme color names like "primary", "secondary", "success", "warning", "error", or "info". The default value is string.Empty for standard header styling.

Declaration

cs-api-definition
[Parameter]
public string ThemeColor { get; set; }

Property Value

string

Top

Defines the top position of the Window relative to the viewport (where the TelerikRootComponent is declared). See Dimensions.

Declaration

cs-api-definition
[Parameter]
public string Top { get; set; }

Property Value

string

TopChanged

Fires when the top parameter has changed.

Declaration

cs-api-definition
[Parameter]
public EventCallback<string> TopChanged { get; set; }

Property Value

EventCallback<string>

Visible

Controls whether the Window is visible and rendered in the DOM. Set to true to show the window or false to hide it. Can be used for initial visibility and runtime toggling. The default value is false.

Declaration

cs-api-definition
[Parameter]
public bool Visible { get; set; }

Property Value

bool

VisibleChanged

Fires when the Visible Parameter has changed.

Declaration

cs-api-definition
[Parameter]
public EventCallback<bool> VisibleChanged { get; set; }

Property Value

EventCallback<bool>

Width

Defines the width of the Window as a CSS value. Supports units like px, %, em, rem, or viewport units (e.g., "400px", "50%", "20em"). If not specified, the window uses content-based sizing.

Declaration

cs-api-definition
[Parameter]
public string Width { get; set; }

Property Value

string

WidthChanged

Fires when the width parameter has changed.

Declaration

cs-api-definition
[Parameter]
public EventCallback<string> WidthChanged { get; set; }

Property Value

EventCallback<string>

WindowActions

Defines the container tag for the Wizard buttons. This setting lets you define the predefined actions of the Window or create your custom actions. See https://docs.telerik.com/blazor-ui/components/window/actions. Children: WindowAction tags.

Declaration

cs-api-definition
[Parameter]
public RenderFragment WindowActions { get; set; }

Property Value

RenderFragment

WindowContent

Defines the content of the Window.

Declaration

cs-api-definition
[Parameter]
public RenderFragment WindowContent { get; set; }

Property Value

RenderFragment

WindowFooter

Defines the footer content of the Window.

Declaration

cs-api-definition
[Parameter]
public RenderFragment WindowFooter { get; set; }

Property Value

RenderFragment

WindowTitle

Defines the title template of the Window.

Declaration

cs-api-definition
[Parameter]
public RenderFragment WindowTitle { get; set; }

Property Value

RenderFragment

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides ComponentBase.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Refresh()

Refresh Method to manually re-render the Window. Useful when the component is disposed.

Declaration

cs-api-definition
public void Refresh()

SetParametersAsync(ParameterView)

Declaration

cs-api-definition
public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides ComponentBase.SetParametersAsync(ParameterView)