About Progress

  • Company
    • Company Overview
    • Leadership
    • Investor Relations
    • Press Releases
    • Press Coverage
    • Events
    • Awards
    • Corporate Blog
    • Customers
    • Careers
    • Offices
  • Technology
    • Cloud Native App Dev Platform
    • Cognitive Services
    • Web Content Management
    • UI/UX Tools
    • Secure Data Connectivity and Integration
    • Secure Managed File Transfer
    • OpenEdge
    • Network Monitoring
  • Services
    • Consulting
    • Education
    • Modernization
    • Outsourcing
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • Conversational UI
    • Online Training
    • Document Processing Library

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP

    Mobile

    UI for Xamarin NativeScript OSS framework

    Desktop

    UI for WPF UI for UWP UI for WinForms

    Reporting & Mocking

    Telerik Reporting Telerik Report Server Telerik JustMock

    Automated Testing

    Test Studio Test Studio Dev Edition

    CMS

    Sitefinity

    UX Design

    Unite UX

    Document Management

    Telerik Document Processing

    Innovations Lab

    VR DataViz

    Free Tools

    Fiddler JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Edit Profile
    • Payment Profiles
    • Renewals & Upgrades
    • Support Tickets
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadWindow

This class represents an interactive window and provides static methods for showing standard dialog windows - Alert, Confirm and Prompt.

Inheritance
System.Object
HeaderedContentControl
WindowBase
RadWindow
FindDialog
ModifyMultiLevelListDialog
NewCaptionLabelDialog
RadRichTextBoxWindow
SchedulerWindow
EditCustomDictionaryDialog
SpellCheckAllAtOnceWindow
SpellCheckWordByWordWindow
Inherited Members
WindowBase.IsModalProperty
WindowBase.IsOpenProperty
WindowBase.IsResizingProperty
WindowBase.IsDraggingProperty
WindowBase.IsActiveWindowProperty
WindowBase.IsTopmostProperty
WindowBase.CaptionHeightProperty
WindowBase.ResizeBorderProperty
WindowBase.LeftProperty
WindowBase.TopProperty
WindowBase.WindowStateProperty
WindowBase.ResizeModeProperty
WindowBase.CanCloseProperty
WindowBase.CanMoveProperty
WindowBase.SizeToContentProperty
WindowBase.HideMinimizeButtonProperty
WindowBase.HideMaximizeButtonProperty
WindowBase.Close()
WindowBase.GetZIndex()
WindowBase.BringToFront()
WindowBase.GetNormalSizeAndPosition()
WindowBase.IDragAware.OnDragStart(Point, Boolean)
WindowBase.IDragAware.OnDragEnd(Point, Boolean, Boolean)
WindowBase.IDragAware.OnDragDelta(Point, Rect, Rect, Boolean)
WindowBase.ShouldActivateOnShow()
WindowBase.ShowWindow(Boolean)
WindowBase.CheckCanClose()
WindowBase.OnLayoutChangeEnded(EventArgs)
WindowBase.OnLocationChanged(EventArgs)
WindowBase.OnLayoutChangeStarted(EventArgs)
WindowBase.GetApplicationSize()
WindowBase.OnLayoutChangeEnded()
WindowBase.OnLayoutChangeStarted()
WindowBase.CloseWithoutEventsAndAnimations()
WindowBase.OnCloseAnimationFinished()
WindowBase.OnShowAnimationFinished()
WindowBase.OnRightMouseButtonUp()
WindowBase.OnRootVisualSizeChanged()
WindowBase.OnDragStart(Point, Boolean)
WindowBase.OnDragEnd(Point, Boolean, Boolean)
WindowBase.OnDragDelta(Point, Rect, Rect, Boolean)
WindowBase.OnActivated(EventArgs)
WindowBase.OnDeactivated(EventArgs)
WindowBase.IsModal
WindowBase.IsOpen
WindowBase.IsTopmost
WindowBase.CaptionHeight
WindowBase.ResizeBorder
WindowBase.Left
WindowBase.Top
WindowBase.IsResizing
WindowBase.IsDragging
WindowBase.IsLayoutChanging
WindowBase.WindowState
WindowBase.ResizeMode
WindowBase.CanClose
WindowBase.CanMove
WindowBase.IsActiveWindow
WindowBase.SizeToContent
WindowBase.HideMaximizeButton
WindowBase.HideMinimizeButton
WindowBase.Owner
WindowBase.Activated
WindowBase.Deactivated
WindowBase.LayoutChangeEnded
WindowBase.LayoutChangeStarted
WindowBase.LocationChanged
WindowBase.WindowStateChanged
HeaderedContentControl.HasHeaderProperty
HeaderedContentControl.HeaderProperty
HeaderedContentControl.HeaderTemplateProperty
HeaderedContentControl.FocusVisualStyleProperty
HeaderedContentControl.HeaderTemplateSelectorProperty
HeaderedContentControl.IsFocusedProperty
HeaderedContentControl.ChangeVisualState()
HeaderedContentControl.OnIsEnabledChanged(DependencyPropertyChangedEventArgs)
HeaderedContentControl.OnHeaderChanged(Object, Object)
HeaderedContentControl.OnHeaderTemplateChanged(DataTemplate, DataTemplate)
HeaderedContentControl.HasHeader
HeaderedContentControl.IsFocused
HeaderedContentControl.Header
HeaderedContentControl.FocusVisualStyle
HeaderedContentControl.HeaderTemplate
HeaderedContentControl.HeaderTemplateSelector
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Navigation.dll

Syntax

[TelerikToolboxCategory("Containers")]
public class RadWindow : WindowBase, INotifyLayoutChange, IWindowDragAware, IDragAware, IClickAware, IWindow

Constructors

RadWindow()

Initializes a new instance of the RadWindow class.

Declaration
public RadWindow()
Remarks

Use this constructor to create an instance of the RadWindow. In order for the RadWindow to be displayed, it is not necessary to add it to the visual tree.

Examples
RadWindow window = new RadWindow();
Dim window As RadWindow = New RadWindow

Fields

BorderBackgroundProperty

Identifies the BorderBackground dependency property.

Declaration
public static readonly DependencyProperty BorderBackgroundProperty
Field Value
System.Windows.DependencyProperty

DialogResultProperty

Identifies the DialogResult dependency property.

Declaration
public static readonly DependencyProperty DialogResultProperty
Field Value
System.Windows.DependencyProperty

IconProperty

Identifies the Icon dependency property.

Declaration
public static readonly DependencyProperty IconProperty
Field Value
System.Windows.DependencyProperty

IconTemplateProperty

Identifies the IconTemplate dependency property.

Declaration
public static readonly DependencyProperty IconTemplateProperty
Field Value
System.Windows.DependencyProperty

IsRestrictedProperty

Identifies the IsRestricted Property.

Declaration
public static readonly DependencyProperty IsRestrictedProperty
Field Value
System.Windows.DependencyProperty

IsRestrictedWhenMaximizedProperty

Identifies the IsRestrictedWhenMaximized Property.

Declaration
public static readonly DependencyProperty IsRestrictedWhenMaximizedProperty
Field Value
System.Windows.DependencyProperty

ModalBackgroundProperty

Identifies the ModalBackground dependency property.

Declaration
public static readonly DependencyProperty ModalBackgroundProperty
Field Value
System.Windows.DependencyProperty

PromptResultProperty

Identifies the PromptResult dependency property.

Declaration
public static readonly DependencyProperty PromptResultProperty
Field Value
System.Windows.DependencyProperty

ResponseButtonProperty

Identifies the ResponseButton Property.

Declaration
public static readonly DependencyProperty ResponseButtonProperty
Field Value
System.Windows.DependencyProperty

RestoreMinimizedLocationProperty

Identifies the RestoreMinimizedLocation Property.

Declaration
public static readonly DependencyProperty RestoreMinimizedLocationProperty
Field Value
System.Windows.DependencyProperty

RestrictedAreaMarginProperty

Identifies the RestrictedAreaMargin Property.

Declaration
public static readonly DependencyProperty RestrictedAreaMarginProperty
Field Value
System.Windows.DependencyProperty

WindowStartupLocationProperty

Identifies the WindowStartupLocation dependency property.

Declaration
public static readonly DependencyProperty WindowStartupLocationProperty
Field Value
System.Windows.DependencyProperty

Properties

BorderBackground

Gets or sets a brush to be used to draw the title of RadWindow. This is a dependency property.

Declaration
public Brush BorderBackground { get; set; }
Property Value
System.Windows.Media.Brush

DefaultSizeRatio

Gets a size ratio when the window has infinity size and it is not restricted. The window size depends on root size and the default ratio.

Declaration
public static double DefaultSizeRatio { get; }
Property Value
System.Double

DialogResult

Gets or sets a DialogResult value for the RadWindow. This is a dependency property.

Declaration
public Nullable<bool> DialogResult { get; set; }
Property Value
System.Nullable<System.Boolean>

Icon

Gets or sets the Icon image to appear in the RadWindow title bar. This is a dependency property.

Declaration
public object Icon { get; set; }
Property Value
System.Object

IconTemplate

Gets or sets the IconTemplate property. This is a dependency property.

Declaration
public DataTemplate IconTemplate { get; set; }
Property Value
System.Windows.DataTemplate

IsRestricted

Gets or sets a value indicating whether this instance is restricted.

Declaration
public bool IsRestricted { get; set; }
Property Value
System.Boolean

True if this instance is restricted; otherwise, false.

IsRestrictedWhenMaximized

Gets or sets whether when maximized the window to be restricted.

Declaration
public bool IsRestrictedWhenMaximized { get; set; }
Property Value
System.Boolean

ModalBackground

Gets or sets a brush for the modal background of RadWindow. This is a dependency property.

Declaration
public Brush ModalBackground { get; set; }
Property Value
System.Windows.Media.Brush

OutOfBrowserOwner

Gets or set the System.Windows.Window owner that hosts the WindowBase in OOB applications.

Declaration
public Window OutOfBrowserOwner { get; set; }
Property Value
System.Windows.Window

PromptResult

Gets or sets a PromptResult value for the RadWindow. This is a dependency property.

Declaration
public string PromptResult { get; set; }
Property Value
System.String

RestoreMinimizedLocation

Gets or sets the value which determines whether the window preserves its size and location when WindowState property is changed. This is a dependency property.

Declaration
public bool RestoreMinimizedLocation { get; set; }
Property Value
System.Boolean

RestrictedAreaMargin

Gets or sets the restricted area margin.

Declaration
public Thickness RestrictedAreaMargin { get; set; }
Property Value
System.Windows.Thickness

The restricted area margin.

WindowStartupLocation

Gets or sets a WindowStartupLocation value for the RadWindow. This is a dependency property.

Declaration
public WindowStartupLocation WindowStartupLocation { get; set; }
Property Value
WindowStartupLocation

Methods

Alert(Object)

Opens an Alert modal window.

Declaration
public static void Alert(object content)
Parameters
System.Object content

The content to be displayed.

Remarks

Use this method to populate Alert message that informs the user for a specific problem or warning.

Alert(Object, EventHandler<WindowClosedEventArgs>)

Opens an Alert modal window.

Declaration
public static void Alert(object content, EventHandler<WindowClosedEventArgs> closed)
Parameters
System.Object content

The content to be displayed.

System.EventHandler<WindowClosedEventArgs> closed

Represents the method that will handle the closed event.

Remarks

Use this method to populate Alert message that informs the user for a specific problem or warning.

Alert(DialogParameters)

Opens an Alert modal window.

Declaration
public static void Alert(DialogParameters dialogParameters)
Parameters
DialogParameters dialogParameters

Structure that holds all possible parameters for customizing dialog window.

Remarks

Use this method to populate Alert message that informs the user for a specific problem or warning.

ChangeVisualState(Boolean)

Updates the visual state of the control.

Declaration
protected override void ChangeVisualState(bool useTransitions)
Parameters
System.Boolean useTransitions

Indicates whether transitions should be used.

Overrides
WindowBase.ChangeVisualState(Boolean)

ConfigureModal(RadAlert, DialogParameters)

Declaration
public static void ConfigureModal(RadAlert content, DialogParameters dialogParams)
Parameters
RadAlert content

DialogParameters dialogParams

Confirm(Object, EventHandler<WindowClosedEventArgs>)

Opens a Confirm modal window.

Declaration
public static void Confirm(object content, EventHandler<WindowClosedEventArgs> closed)
Parameters
System.Object content

The content to be displayed.

System.EventHandler<WindowClosedEventArgs> closed

Represents the method that will handle the closed event.

Remarks

Use this method to populate Confirm message that request the user to confirm some actions.

Confirm(DialogParameters)

Opens a Confirm modal window.

Declaration
public static void Confirm(DialogParameters dialogParameters)
Parameters
DialogParameters dialogParameters

Structure that holds all possible parameters for customizing dialog window.

Remarks

Use this method to populate Confirm message that request the user to confirm some actions.

GetParentRadWindow(DependencyObject)

This walks the visual tree for a parent of a specific type.

Declaration
public static RadWindow GetParentRadWindow(DependencyObject child)
Parameters
System.Windows.DependencyObject child

The object which parent is searched.

Returns
RadWindow

GetResponseButton(DependencyObject)

Gets the response button.

Declaration
public static ResponseButton GetResponseButton(DependencyObject button)
Parameters
System.Windows.DependencyObject button

The button.

Returns
ResponseButton

GetWindowOwner()

Declaration
protected override ContentControl GetWindowOwner()
Returns
System.Windows.Controls.ContentControl

Overrides
WindowBase.GetWindowOwner()

GetWindowStartupLocation()

Declaration
protected override WindowStartupLocation GetWindowStartupLocation()
Returns
WindowStartupLocation

Overrides
WindowBase.GetWindowStartupLocation()

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate.

Declaration
public override void OnApplyTemplate()
Overrides
WindowBase.OnApplyTemplate()

OnClosed()

Declaration
protected override void OnClosed()
Overrides
WindowBase.OnClosed()

OnClosed(WindowClosedEventArgs)

Raises the Closed event.

Declaration
protected virtual void OnClosed(WindowClosedEventArgs args)
Parameters
WindowClosedEventArgs args

The WindowClosedEventArgs instance containing the event data.

OnClosing()

Declaration
protected override bool OnClosing()
Returns
System.Boolean

Overrides
WindowBase.OnClosing()

OnCreateAutomationPeer()

Create the automation peer for this class.

Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer

Overrides
WindowBase.OnCreateAutomationPeer()

OnGotFocus(RoutedEventArgs)

Called before the System.Windows.UIElement.GotFocus event occurs.

Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs e

The data for the event.

Overrides
WindowBase.OnGotFocus(RoutedEventArgs)

OnIsFocusedChanged(DependencyPropertyChangedEventArgs)

Called when the IsFocused property changes.

Declaration
protected override void OnIsFocusedChanged(DependencyPropertyChangedEventArgs e)
Parameters
System.Windows.DependencyPropertyChangedEventArgs e

Event args with the old and the new value of the property.

Overrides
HeaderedContentControl.OnIsFocusedChanged(DependencyPropertyChangedEventArgs)

OnKeyDown(KeyEventArgs)

Called before the System.Windows.UIElement.KeyDown event occurs.

Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Input.KeyEventArgs e

The data for the event.

OnLostFocus(RoutedEventArgs)

Called before the System.Windows.UIElement.LostFocus event occurs.

Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs e

The data for the event.

Overrides
HeaderedContentControl.OnLostFocus(RoutedEventArgs)

OnPreviewClosed()

Declaration
protected virtual bool OnPreviewClosed()
Returns
System.Boolean

OnPreviewClosed(WindowPreviewClosedEventArgs)

Raises the PreviewClose event.

Declaration
protected virtual void OnPreviewClosed(WindowPreviewClosedEventArgs args)
Parameters
WindowPreviewClosedEventArgs args

The WindowPreviewClosedEventArgs instance containing the event data.

OnWindowStateChanged(EventArgs)

Raises the WindowStateChanged event.

Declaration
protected override void OnWindowStateChanged(EventArgs args)
Parameters
System.EventArgs args

The System.Windows.RoutedEventArgs instance containing the event data.

Overrides
WindowBase.OnWindowStateChanged(EventArgs)

Prompt(Object, EventHandler<WindowClosedEventArgs>)

Opens a Prompt modal window.

Declaration
public static void Prompt(object content, EventHandler<WindowClosedEventArgs> closed)
Parameters
System.Object content

Question to the user.

System.EventHandler<WindowClosedEventArgs> closed

Represents the method that will handle the closed event.

Remarks

Use this method to populate Prompt message that requires the user to enter specific value.

Prompt(Object, EventHandler<WindowClosedEventArgs>, String)

Opens a Prompt modal window.

Declaration
public static void Prompt(object content, EventHandler<WindowClosedEventArgs> closed, string defaultPromptResult)
Parameters
System.Object content

Question to the user.

System.EventHandler<WindowClosedEventArgs> closed

Represents the method that will handle the closed event.

System.String defaultPromptResult

The default prompt result value that will appear in the textbox.

Remarks

Use this method to populate Prompt message that requires the user to enter specific value.

Prompt(DialogParameters)

Opens a Prompt modal window.

Declaration
public static void Prompt(DialogParameters dialogParameters)
Parameters
DialogParameters dialogParameters

Structure that holds all possible parameters for customizing dialog window.

SetResponseButton(DependencyObject, ResponseButton)

Sets the response button.

Declaration
public static void SetResponseButton(DependencyObject button, ResponseButton value)
Parameters
System.Windows.DependencyObject button

The button.

ResponseButton value

The ResponseButton value.

ShouldFocusOnActivate()

Declaration
protected override bool ShouldFocusOnActivate()
Returns
System.Boolean

Overrides
WindowBase.ShouldFocusOnActivate()

Show()

Opens RadWindow in case it hasn't been already opened.

Declaration
public void Show()
Examples
RadWindow window = new RadWindow();
window.Height = 100;
window.Width = 100;
window.Header = "RadWindow";
window.Content = "This is your content";
window.Show();
Dim window As RadWindow = New RadWindow
window.Height = 100
window.Width = 100
window.Header = "RadWindow"
window.Content = "This is your content"
window.Show()

ShowDialog()

Opens modal RadWindow in case it hasn't been already opened.

Declaration
public void ShowDialog()
Examples
RadWindow window = new RadWindow();
window.Height = 100;
window.Width = 100;
window.Header = "RadWindow";
window.Content = "This is your content";
window.ShowDialog();
Dim window As RadWindow = New RadWindow
window.Height = 100
window.Width = 100
window.Header = "RadWindow"
window.Content = "This is your content"
window.ShowDialog()

Events

Closed

Occurs when the RadWindow is closed.

Declaration
[SRCategory("Behavior")]
public event EventHandler<WindowClosedEventArgs> Closed
Event Type
System.EventHandler<WindowClosedEventArgs>

Remarks

The event is raised right next after the PreviewClosed event. Both events are raise by Close method.

PreviewClosed

Occurs when the RadWindow is closing.

Declaration
[SRCategory("Behavior")]
public event EventHandler<WindowPreviewClosedEventArgs> PreviewClosed
Event Type
System.EventHandler<WindowPreviewClosedEventArgs>

Remarks

The event is raised whenever the Close method is invoked.

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

Was this article helpful?

 / 

Give article feedback

Tell us how we can improve this article

Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
  • Themes Generator
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
  • System Requirements
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.