Class
RadWindow

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

Definition

Namespace:Telerik.UI.Xaml.Controls

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public class RadWindow : WindowBase, INotifyLayoutChange, IDragAware

Inheritance: objectHeaderedContentControlWindowBaseRadWindow

Derived Classes: FindDialogPasswordRequiredDialogSignSignatureDialogSignaturePropertiesDialogSchedulerWindow

Implements: IDragAwareINotifyLayoutChange

Inherited Members WindowBase.IsModalPropertyWindowBase.IsOpenPropertyWindowBase.IsResizingPropertyWindowBase.IsDraggingPropertyWindowBase.IsActiveWindowPropertyWindowBase.IsTopmostPropertyWindowBase.CaptionHeightPropertyWindowBase.ResizeBorderPropertyWindowBase.LeftPropertyWindowBase.TopPropertyWindowBase.WindowStatePropertyWindowBase.ResizeModePropertyWindowBase.CanClosePropertyWindowBase.CanMovePropertyWindowBase.SizeToContentPropertyWindowBase.HideMinimizeButtonPropertyWindowBase.HideMaximizeButtonPropertyWindowBase.Close()WindowBase.GetZIndex()WindowBase.BringToFront()WindowBase.GetNormalSizeAndPosition()WindowBase.ShouldActivateOnShow()WindowBase.ShowWindow(bool)WindowBase.CheckCanClose()WindowBase.OnLayoutChangeEnded(EventArgs)WindowBase.OnLocationChanged(EventArgs)WindowBase.OnLayoutChangeStarted(EventArgs)WindowBase.OnGotFocus(RoutedEventArgs)WindowBase.GetApplicationSize()WindowBase.OnLayoutChangeEnded()WindowBase.OnLayoutChangeStarted()WindowBase.CloseWithoutEventsAndAnimations()WindowBase.OnCloseAnimationFinished()WindowBase.OnShowAnimationFinished()WindowBase.OnRightMouseButtonUp()WindowBase.OnRootVisualSizeChanged()WindowBase.OnDragStart(Point, bool)WindowBase.OnDragEnd(Point, bool, bool)WindowBase.OnDragDelta(Point, Rect, Rect, bool)WindowBase.OnActivated(EventArgs)WindowBase.OnDeactivated(EventArgs)WindowBase.IsModalWindowBase.IsOpenWindowBase.IsTopmostWindowBase.CaptionHeightWindowBase.ResizeBorderWindowBase.LeftWindowBase.TopWindowBase.IsResizingWindowBase.IsDraggingWindowBase.IsLayoutChangingWindowBase.WindowStateWindowBase.ResizeModeWindowBase.CanCloseWindowBase.CanMoveWindowBase.IsActiveWindowWindowBase.SizeToContentWindowBase.HideMaximizeButtonWindowBase.HideMinimizeButtonWindowBase.OwnerWindowBase.ActivatedWindowBase.DeactivatedWindowBase.LayoutChangeEndedWindowBase.LayoutChangeStartedWindowBase.LocationChangedWindowBase.WindowStateChangedHeaderedContentControl.HasHeaderPropertyHeaderedContentControl.HeaderPropertyHeaderedContentControl.HeaderTemplatePropertyHeaderedContentControl.FocusVisualStylePropertyHeaderedContentControl.HeaderTemplateSelectorPropertyHeaderedContentControl.IsFocusedPropertyHeaderedContentControl.ChangeVisualState()HeaderedContentControl.OnIsEnabledChanged(DependencyPropertyChangedEventArgs)HeaderedContentControl.OnHeaderChanged(object, object)HeaderedContentControl.OnHeaderTemplateChanged(DataTemplate, DataTemplate)HeaderedContentControl.OnIsFocusedChanged(DependencyPropertyChangedEventArgs)HeaderedContentControl.OnLostFocus(RoutedEventArgs)HeaderedContentControl.HasHeaderHeaderedContentControl.IsFocusedHeaderedContentControl.HeaderHeaderedContentControl.FocusVisualStyleHeaderedContentControl.HeaderTemplateHeaderedContentControl.HeaderTemplateSelector

Constructors

RadWindow()

Initializes a new instance of the RadWindow class.

Declaration

cs-api-definition
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.

Example

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

Fields

BorderBackgroundProperty

Identifies the BorderBackground dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty BorderBackgroundProperty

Field Value

DependencyProperty

DialogResultProperty

Identifies the DialogResult dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DialogResultProperty

Field Value

DependencyProperty

IconProperty

Identifies the Icon dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IconProperty

Field Value

DependencyProperty

IconTemplateProperty

Identifies the IconTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IconTemplateProperty

Field Value

DependencyProperty

IsRestrictedProperty

Identifies the IsRestricted Property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsRestrictedProperty

Field Value

DependencyProperty

IsRestrictedWhenMaximizedProperty

Identifies the IsRestrictedWhenMaximized Property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsRestrictedWhenMaximizedProperty

Field Value

DependencyProperty

ModalBackgroundProperty

Identifies the ModalBackground dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ModalBackgroundProperty

Field Value

DependencyProperty

PromptResultProperty

Identifies the PromptResult dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PromptResultProperty

Field Value

DependencyProperty

ResponseButtonProperty

Identifies the ResponseButton Property.

Declaration

cs-api-definition
public static readonly DependencyProperty ResponseButtonProperty

Field Value

DependencyProperty

RestoreMinimizedLocationProperty

Identifies the RestoreMinimizedLocation Property.

Declaration

cs-api-definition
public static readonly DependencyProperty RestoreMinimizedLocationProperty

Field Value

DependencyProperty

RestrictedAreaMarginProperty

Identifies the RestrictedAreaMargin Property.

Declaration

cs-api-definition
public static readonly DependencyProperty RestrictedAreaMarginProperty

Field Value

DependencyProperty

WindowStartupLocationProperty

Identifies the WindowStartupLocation dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty WindowStartupLocationProperty

Field Value

DependencyProperty

Properties

BorderBackground

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

Declaration

cs-api-definition
public Brush BorderBackground { get; set; }

Property Value

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

cs-api-definition
public static double DefaultSizeRatio { get; }

Property Value

double

DialogResult

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

Declaration

cs-api-definition
public bool? DialogResult { get; set; }

Property Value

bool?

Icon

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

Declaration

cs-api-definition
public object Icon { get; set; }

Property Value

object

IconTemplate

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

Declaration

cs-api-definition
public DataTemplate IconTemplate { get; set; }

Property Value

DataTemplate

IsRestricted

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

Declaration

cs-api-definition
public bool IsRestricted { get; set; }

Property Value

bool

True if this instance is restricted; otherwise, false.

IsRestrictedWhenMaximized

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

Declaration

cs-api-definition
public bool IsRestrictedWhenMaximized { get; set; }

Property Value

bool

ModalBackground

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

Declaration

cs-api-definition
public Brush ModalBackground { get; set; }

Property Value

Brush

OutOfBrowserOwner

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

Declaration

cs-api-definition
public Window OutOfBrowserOwner { get; set; }

Property Value

Window

PromptResult

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

Declaration

cs-api-definition
public string PromptResult { get; set; }

Property Value

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

cs-api-definition
public bool RestoreMinimizedLocation { get; set; }

Property Value

bool

RestrictedAreaMargin

Gets or sets the restricted area margin.

Declaration

cs-api-definition
public Thickness RestrictedAreaMargin { get; set; }

Property Value

Thickness

The restricted area margin.

WindowStartupLocation

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

Declaration

cs-api-definition
public WindowStartupLocation WindowStartupLocation { get; set; }

Property Value

WindowStartupLocation

Methods

ChangeVisualState(bool)

Updates the visual state of the control.

Declaration

cs-api-definition
protected override void ChangeVisualState(bool useTransitions)

Parameters

useTransitions

bool

Indicates whether transitions should be used.

Overrides WindowBase.ChangeVisualState(bool)

GetParentRadWindow(DependencyObject)

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

Declaration

cs-api-definition
public static RadWindow GetParentRadWindow(DependencyObject child)

Parameters

child

DependencyObject

The object which parent is searched.

Returns

RadWindow

GetResponseButton(DependencyObject)

Gets the response button.

Declaration

cs-api-definition
public static ResponseButton GetResponseButton(DependencyObject button)

Parameters

button

DependencyObject

The button.

Returns

ResponseButton

GetWindowOwner()

Declaration

cs-api-definition
protected override ContentControl GetWindowOwner()

Returns

ContentControl

Overrides WindowBase.GetWindowOwner()

GetWindowStartupLocation()

Declaration

cs-api-definition
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 .

Declaration

cs-api-definition
protected override void OnApplyTemplate()

Overrides HeaderedContentControl.OnApplyTemplate()

OnClosed()

Declaration

cs-api-definition
protected override void OnClosed()

Overrides WindowBase.OnClosed()

OnClosed(WindowClosedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnClosed(WindowClosedEventArgs args)

Parameters

args

WindowClosedEventArgs

The WindowClosedEventArgs instance containing the event data.

OnClosing()

Declaration

cs-api-definition
protected override bool OnClosing()

Returns

bool

Overrides WindowBase.OnClosing()

OnPreviewClosed()

Declaration

cs-api-definition
protected virtual bool OnPreviewClosed()

Returns

bool

OnPreviewClosed(WindowPreviewClosedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnPreviewClosed(WindowPreviewClosedEventArgs args)

Parameters

args

WindowPreviewClosedEventArgs

The WindowPreviewClosedEventArgs instance containing the event data.

OnPreviewKeyDown(KeyRoutedEventArgs)

Declaration

cs-api-definition
protected override void OnPreviewKeyDown(KeyRoutedEventArgs e)

Parameters

e

KeyRoutedEventArgs

OnWindowStateChanged(EventArgs)

Raises the event.

Declaration

cs-api-definition
protected override void OnWindowStateChanged(EventArgs args)

Parameters

args

EventArgs

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

Overrides WindowBase.OnWindowStateChanged(EventArgs)

SetResponseButton(DependencyObject, ResponseButton)

Sets the response button.

Declaration

cs-api-definition
public static void SetResponseButton(DependencyObject button, ResponseButton value)

Parameters

button

DependencyObject

The button.

value

ResponseButton

The ResponseButton value.

ShouldFocusOnActivate()

Declaration

cs-api-definition
protected override bool ShouldFocusOnActivate()

Returns

bool

Overrides WindowBase.ShouldFocusOnActivate()

Show()

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

Declaration

cs-api-definition
public void Show()

Example

csharp
RadWindow window = new RadWindow();
window.Height = 100;
window.Width = 100;
window.Header = "RadWindow";
window.Content = "This is your content";
window.Show();
csharp
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

cs-api-definition
public void ShowDialog()

Example

csharp
RadWindow window = new RadWindow();
window.Height = 100;
window.Width = 100;
window.Header = "RadWindow";
window.Content = "This is your content";
window.ShowDialog();
csharp
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

cs-api-definition
public event EventHandler<WindowClosedEventArgs> Closed

Event Value

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

cs-api-definition
public event EventHandler<WindowPreviewClosedEventArgs> PreviewClosed

Event Value

EventHandler<WindowPreviewClosedEventArgs>

Remarks

The event is raised whenever the Close method is invoked.