ClassWindowBase
Definition
Namespace:Telerik.UI.Xaml.Controls
Assembly:Telerik.WinUI.Controls.dll
Syntax:
public abstract class WindowBase : HeaderedContentControl, INotifyLayoutChange, IDragAware
Inheritance: objectHeaderedContentControlWindowBase
Derived Classes:
Implements:
Inherited Members
Constructors
WindowBase()
Initializes a new instance of the WindowBase class.
Declaration
protected WindowBase()
Fields
CanCloseProperty
Identifies the
Declaration
public static readonly DependencyProperty CanCloseProperty
Field Value
DependencyProperty
CanMoveProperty
Identifies the
Declaration
public static readonly DependencyProperty CanMoveProperty
Field Value
DependencyProperty
CaptionHeightProperty
Identifies the CaptionHeight dependency property.
Declaration
public static readonly DependencyProperty CaptionHeightProperty
Field Value
DependencyProperty
HideMaximizeButtonProperty
Identifies the HideMaximizeButton dependency property.
Declaration
public static readonly DependencyProperty HideMaximizeButtonProperty
Field Value
DependencyProperty
HideMinimizeButtonProperty
Identifies the HideMinimizeButton dependency property.
Declaration
public static readonly DependencyProperty HideMinimizeButtonProperty
Field Value
DependencyProperty
IsActiveWindowProperty
Identifies the
Declaration
public static readonly DependencyProperty IsActiveWindowProperty
Field Value
DependencyProperty
IsDraggingProperty
Identifies the
Declaration
public static readonly DependencyProperty IsDraggingProperty
Field Value
DependencyProperty
IsModalProperty
Identifies the
Declaration
public static readonly DependencyProperty IsModalProperty
Field Value
DependencyProperty
IsOpenProperty
Identifies the
Declaration
public static readonly DependencyProperty IsOpenProperty
Field Value
DependencyProperty
IsResizingProperty
Identifies the
Declaration
public static readonly DependencyProperty IsResizingProperty
Field Value
DependencyProperty
IsTopmostProperty
Identifies the IsTopmost dependency property.
Declaration
public static readonly DependencyProperty IsTopmostProperty
Field Value
DependencyProperty
LeftProperty
Identifies the
Declaration
public static readonly DependencyProperty LeftProperty
Field Value
DependencyProperty
ResizeBorderProperty
Identifies the ResizeBorder dependency property.
Declaration
public static readonly DependencyProperty ResizeBorderProperty
Field Value
DependencyProperty
ResizeModeProperty
Identifies the
Declaration
public static readonly DependencyProperty ResizeModeProperty
Field Value
DependencyProperty
SizeToContentProperty
Identifies the
Declaration
public static readonly DependencyProperty SizeToContentProperty
Field Value
DependencyProperty
TopProperty
Identifies the
Declaration
public static readonly DependencyProperty TopProperty
Field Value
DependencyProperty
WindowStateProperty
Identifies the
Declaration
public static readonly DependencyProperty WindowStateProperty
Field Value
DependencyProperty
Properties
CanClose
Gets or sets whether WindowBase can be closed. This is a dependency property.
Declaration
public bool CanClose { get; set; }
Property Value
True if this instance can be closed; false otherwise.
Remarks
If the value of this property is true, the instance
cannot be closed and the Close button is hidden; otherwise it can be closed.
CanMove
Gets or sets whether WindowBase can be dragged. This is a dependency property.
Declaration
public bool CanMove { get; set; }
Property Value
True if this instance can be dragged; otherwise, false.
Remarks
If the value of this property is true, the instance
can be dragged; otherwise it is is fixed.
CaptionHeight
The extent of the top of the window to treat as the caption.
HideMaximizeButton
Gets or sets the visibility of the Maximize button.
HideMinimizeButton
Gets or sets the visibility of the Minimize button.
IsActiveWindow
Gets a value indicating whether this instance is active. This is a dependency property.
Declaration
public bool IsActiveWindow { get; }
Property Value
True if this instance is active; otherwise, false.
IsDragging
Gets a value indicating whether this instance is dragging. This is a dependency property.
Declaration
public bool IsDragging { get; protected set; }
Property Value
True if this instance is is dragging; otherwise, false.
IsLayoutChanging
Gets a value indicating whether this instance is layout changing.
Declaration
public bool IsLayoutChanging { get; }
Property Value
True if this instance is layout changing; otherwise, false.
Implements
IsModal
Gets a value that represents whether the WindowBase is modal. This is a dependency property.
IsOpen
Gets a value that represents whether the WindowBase is open. This is a dependency property.
IsResizing
Gets a value indicating whether this instance is resizing. This is a dependency property.
Declaration
public bool IsResizing { get; protected set; }
Property Value
True if this instance is resizing;false otherwise.
IsTopmost
Gets or sets whether the WindowBase is on top.
Left
Gets or sets a value that represents the distance between the left side of an element and the left side of the page. This is a dependency property.
Owner
Gets or sets the Owner of the WindowBase.
Declaration
public ContentControl Owner { get; set; }
Property Value
ContentControl
ResizeBorder
Get the bounds of the resize grips on the Window.
Declaration
public Thickness ResizeBorder { get; set; }
Property Value
Thickness
ResizeMode
Gets or sets a ResizeMode value for the WindowBase. This is a dependency property.
SizeToContent
The value of this property is ignored if the Width and Height properties are set.
Top
Gets or sets a value that represents the distance between the top of an element and the top of the page. This is a dependency property.
WindowState
Gets or sets a WindowBase value for the WindowBase. This is a dependency property.
Declaration
public WindowState WindowState { get; set; }
Property Value
Methods
BringToFront()
Attempts to bring the WindowBase over any other WindowBases except topmost.
Declaration
public void BringToFront()
Remarks
Whenever opened WindowBase automatically appears over any other windows except topmost.
ChangeVisualState(bool)
Declaration
protected override void ChangeVisualState(bool useTransitions)
Parameters
useTransitions
Overrides
CheckCanClose()
Checks whether the window can be closed. This method doesn't consider the CanClose property, but checked for some other kind of constraints.
Declaration
protected virtual bool CheckCanClose()
Returns
True if the window can be changed; false otherwise.
Close()
Manually closes WindowBase.
Declaration
public void Close()
Remarks
Raises
Example
WindowBase window = new WindowBase();
window.Height = 100;
window.Width = 100;
window.Header = "WindowBase";
window.Content = "This is your content";
window.Show();
window.Close();
Dim window As WindowBase = New WindowBase
window.Height = 100
window.Width = 100
window.Header = "WindowBase"
window.Content = "This is your content"
window.Show()
window.Close()
CloseWithoutEventsAndAnimations()
Closes the Window instantly and the closing cannot be interrupted.
Declaration
protected void CloseWithoutEventsAndAnimations()
GetApplicationSize()
Gets the application size depending on the platform.
Declaration
protected Size GetApplicationSize()
Returns
Size
GetNormalSizeAndPosition()
Gets the size and position of the WindowBase in its normal state.
Declaration
public Rect GetNormalSizeAndPosition()
Returns
Rect
A rectangle with the Left, Top, Width and Height properties of the WindowBase in normal state.
GetWindowOwner()
Declaration
protected virtual ContentControl GetWindowOwner()
Returns
ContentControl
GetWindowStartupLocation()
Declaration
protected virtual WindowStartupLocation GetWindowStartupLocation()
Returns
OnActivated(EventArgs)
Raises the event. This method is called when the window is activated.
OnCloseAnimationFinished()
Declaration
protected virtual void OnCloseAnimationFinished()
OnClosed()
Declaration
protected virtual void OnClosed()
OnDeactivated(EventArgs)
Raises the event. This method is called when the window is deactivated.
OnDragDelta(Point, Rect, Rect, bool)
Declaration
protected virtual Rect OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, bool isResize)
Parameters
globalMousePosition
Point
initialRect
Rect
destinationRect
Rect
isResize
Returns
Rect
OnDragStart(Point, bool)
Declaration
protected virtual void OnDragStart(Point globalMousePosition, bool isResize)
Parameters
globalMousePosition
Point
isResize
OnGotFocus(RoutedEventArgs)
Called before the System.Windows.UIElement.GotFocus event occurs.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
The data for the event.
Overrides
OnLayoutChangeEnded()
Declaration
protected void OnLayoutChangeEnded()
OnLayoutChangeEnded(EventArgs)
Raises the event.
OnLayoutChangeStarted()
Declaration
protected void OnLayoutChangeStarted()
OnLayoutChangeStarted(EventArgs)
Raises the event.
OnLocationChanged(EventArgs)
Raises the event.
Declaration
protected virtual void OnLocationChanged(EventArgs args)
Parameters
args
The System.Windows.RoutedEventArgs instance containing the event data.
OnRightMouseButtonUp()
Declaration
protected virtual void OnRightMouseButtonUp()
OnRootVisualSizeChanged()
Declaration
protected virtual void OnRootVisualSizeChanged()
OnShowAnimationFinished()
Declaration
protected virtual void OnShowAnimationFinished()
OnWindowStateChanged(EventArgs)
Raises the event.
Declaration
protected virtual void OnWindowStateChanged(EventArgs args)
Parameters
args
The System.Windows.RoutedEventArgs instance containing the event data.
ShowWindow(bool)
Shows the window either modally or not. This method should be used in the subclasses to open the window.
Declaration
protected virtual void ShowWindow(bool isModal)
Parameters
isModal
Whether the window is modal or not.
Events
Activated
Occurs when the Window is activated.
Deactivated
Occurs when the Window is deactivated.
LayoutChangeEnded
Occurs when a layout change is ended.
Declaration
public event EventHandler LayoutChangeEnded
Event Value
Implements
LayoutChangeStarted
Occurs when a layout change is started.
Declaration
public event EventHandler LayoutChangeStarted
Event Value
Implements
LocationChanged
Occurs when the value of a Left or Top changes.
WindowStateChanged
Occurs when the value of a WindowState changes.
Declaration
public event EventHandler WindowStateChanged
Event Value
Remarks
The event is raised whenever the