Interface IWindowImpl
Defines a platform-specific window implementation.
[Unstable]
public interface IWindowImpl : IWindowBaseImpl, ITopLevelImpl, IOptionalFeatureProvider, IDisposable
- Inherited Members
Properties
Closing
Gets or sets a method called before the underlying implementation is destroyed. Return true to prevent the underlying implementation from closing.
Func<WindowCloseReason, bool>? Closing { get; set; }
Property Value
ExtendClientAreaToDecorationsChanged
Gets or Sets an action that is called whenever one of the extend client area properties changed.
Action<bool>? ExtendClientAreaToDecorationsChanged { get; set; }
Property Value
ExtendedMargins
Gets a thickness that describes the amount each side of the non-client area extends into the client area. It includes the titlebar.
Thickness ExtendedMargins { get; }
Property Value
GotInputWhenDisabled
Called when a disabled window received input. Can be used to activate child windows.
Action? GotInputWhenDisabled { get; set; }
Property Value
IsClientAreaExtendedToDecorations
Gets a value to indicate if the platform was able to extend client area to non-client area.
bool IsClientAreaExtendedToDecorations { get; }
Property Value
NeedsManagedDecorations
Gets a flag that indicates if Managed decorations i.e. caption buttons are required. This property is used when IsClientAreaExtendedToDecorations is set.
bool NeedsManagedDecorations { get; }
Property Value
OffScreenMargin
Gets a thickness that describes the margin around the window that is offscreen. This may happen when a window is maximized and IsClientAreaExtendedToDecorations is set.
Thickness OffScreenMargin { get; }
Property Value
WindowState
Gets or sets the minimized/maximized state of the window.
WindowState WindowState { get; set; }
Property Value
WindowStateChanged
Gets or sets a method called when the minimized/maximized state of the window changes.
Action<WindowState>? WindowStateChanged { get; set; }
Property Value
Methods
BeginMoveDrag(PointerPressedEventArgs)
Starts moving a window with left button being held. Should be called from left mouse button press event handler.
void BeginMoveDrag(PointerPressedEventArgs e)
Parameters
BeginResizeDrag(WindowEdge, PointerPressedEventArgs)
Starts resizing a window. This function is used if an application has window resizing controls. Should be called from left mouse button press event handler
void BeginResizeDrag(WindowEdge edge, PointerPressedEventArgs e)
Parameters
CanResize(bool)
Enables or disables resizing of the window
void CanResize(bool value)
Parameters
value
bool
GetWindowsZOrder(Span<Window>, Span<long>)
Fills zOrder with numbers that represent the relative order of the windows in the z-order. The topmost window should have the highest number. Both the windows and zOrder lists are expected to be the same length.
void GetWindowsZOrder(Span<Window> windows, Span<long> zOrder)
Parameters
windows
Span<Window>A span of windows to get their z-order
zOrder
Span<long>Span to be filled with associated window z-order
Move(PixelPoint)
Sets the client size of the top level.
void Move(PixelPoint point)
Parameters
point
PixelPoint
Resize(Size, WindowResizeReason)
Sets the client size of the top level.
void Resize(Size clientSize, WindowResizeReason reason = WindowResizeReason.Application)
Parameters
clientSize
SizeThe new client size.
reason
WindowResizeReasonThe reason for the resize.
SetEnabled(bool)
Disables the window for example when a modal dialog is open.
void SetEnabled(bool enable)
Parameters
enable
booltrue if the window is enabled, or false if it is disabled.
SetExtendClientAreaChromeHints(ExtendClientAreaChromeHints)
Sets hints that configure how the client area extends.
void SetExtendClientAreaChromeHints(ExtendClientAreaChromeHints hints)
Parameters
SetExtendClientAreaTitleBarHeightHint(double)
Sets how big the non-client titlebar area should be.
void SetExtendClientAreaTitleBarHeightHint(double titleBarHeight)
Parameters
titleBarHeight
double-1 for platform default, otherwise the height in DIPs.
SetExtendClientAreaToDecorationsHint(bool)
Sets if the ClientArea is extended into the non-client area.
void SetExtendClientAreaToDecorationsHint(bool extendIntoClientAreaHint)
Parameters
extendIntoClientAreaHint
booltrue to enable, false to disable
SetIcon(IWindowIconImpl?)
Sets the icon of this window.
void SetIcon(IWindowIconImpl? icon)
Parameters
icon
IWindowIconImpl
SetMinMaxSize(Size, Size)
Minimum width of the window.
void SetMinMaxSize(Size minSize, Size maxSize)
Parameters
SetParent(IWindowImpl?)
Sets the parent of the window.
void SetParent(IWindowImpl? parent)
Parameters
parent
IWindowImplThe parent IWindowImpl.
SetSystemDecorations(SystemDecorations)
Enables or disables system window decorations (title bar, buttons, etc)
void SetSystemDecorations(SystemDecorations enabled)
Parameters
enabled
SystemDecorations
SetTitle(string?)
Sets the title of the window.
void SetTitle(string? title)
Parameters
title
stringThe title.
ShowTaskbarIcon(bool)
Enables or disables the taskbar icon
void ShowTaskbarIcon(bool value)
Parameters
value
bool