Class WindowEx
A custom WinUI Window with more convenience methods
Inherited Members
Namespace: WinUIEx
Assembly: WinUIEx.dll
Syntax
[ContentProperty(Name = "WindowContent")]
public class WindowEx : Window, IWinRTObject, IDynamicInterfaceCastable, IEquatable<Window>
Constructors
| Name | Description |
|---|---|
| WindowEx() | Initializes a new instance of the WindowEx class. |
Properties
| Name | Description |
|---|---|
| AppWindow | Gets a reference to the AppWindow for the app |
| Height | Gets or sets the height of the window |
| IsAlwaysOnTop | Gets or sets a value indicating whether this window is always on top. |
| IsMaximizable | Gets or sets a value indicating whether the maximimze button is visible |
| IsMinimizable | Gets or sets a value indicating whether the minimize button is visible |
| IsResizable | Gets or sets a value indicating whether the window can be resized. |
| IsShownInSwitchers | Gets or sets a value indicating whether this window is shown in task switchers. |
| IsTitleBarVisible | Gets or sets a value indicating whether the default title bar is visible or not. |
| IsVisibleInTray | Gets or sets a value indicating whether the window is shown in the system tray. |
| MaxHeight | Gets or sets the maximum height of this window |
| MaxWidth | Gets or sets the maximum width of this window |
| MinHeight | Gets or sets the minimum height of this window |
| MinWidth | Gets or sets the minimum width of this window |
| PersistenceId | Gets or sets a unique ID used for saving and restoring window size and position across sessions. |
| Presenter | Gets the presenter for the current window |
| PresenterKind | Gets or sets the presenter kind for the current window |
| TaskBarIcon | Gets or sets the task bar icon. |
| Title | Gets or sets the window title. |
| Width | Gets or sets the width of the window |
| WindowContent | Gets or sets the Window content |
| WindowState | Gets or sets the current window state. |
Methods
| Name | Description |
|---|---|
| BringToFront() | Brings the window to the front |
| OnPositionChanged(PointInt32) | Called when the window position changed. |
| OnPresenterChanged(AppWindowPresenter) | Called when the presenter for the window changed. |
| OnSizeChanged(Size) | Called when the size of the window changes. |
| OnStateChanged(WindowState) | Called when the WindowState changed. |
| OnZOrderChanged(ZOrderInfo) | Called when the Z order of the window changed. |
| ShowMessageDialogAsync(string, IList<IUICommand>?, uint, uint, string) | Shows a message dialog |
| ShowMessageDialogAsync(string, string) | Shows a message dialog |
Events
| Name | Description |
|---|---|
| PositionChanged | Raised if the window position changes. |
| PresenterChanged | Raised if the presenter for the window changed. |
| WindowStateChanged | Occurs when the window's WindowState property changes. |
| ZOrderChanged | Raised if the Z order of the window changed. |