IWindowImpl Interface

Summary

Defines a platform-specific window implementation.
Namespace
Avalonia.Platform
Interfaces
graph BT Type-.->Interface0["IWindowBaseImpl"] click Interface0 "/api/Avalonia.Platform/IWindowBaseImpl" Type-.->Interface1["ITopLevelImpl"] click Interface1 "/api/Avalonia.Platform/ITopLevelImpl" Type-.->Interface2["IDisposable"] Type["IWindowImpl"] class Type type-node

Syntax

public interface IWindowImpl : IWindowBaseImpl, ITopLevelImpl, IDisposable

Properties

Name Value Summary
Closing Func<bool>
Gets or sets a method called before the underlying implementation is destroyed. Return true to prevent the underlying implementation from closing.
ExtendClientAreaToDecorationsChanged Action<bool>
Gets or Sets an action that is called whenever one of the extend client area properties changed.
ExtendedMargins Thickness
Gets a thickness that describes the amount each side of the non-client area extends into the client area. It includes the titlebar.
GotInputWhenDisabled Action
Called when a disabled window received input. Can be used to activate child windows.
IsClientAreaExtendedToDecorations bool
Gets a value to indicate if the platform was able to extend client area to non-client area.
NeedsManagedDecorations bool
Gets a flag that indicates if Managed decorations i.e. caption buttons are required. This property is used when IsClientAreaExtendedToDecorations is set.
OffScreenMargin Thickness
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.
WindowState WindowState
Gets or sets the minimized/maximized state of the window.
WindowStateChanged Action<WindowState>
Gets or sets a method called when the minimized/maximized state of the window changes.

Methods

Name Value Summary
BeginMoveDrag(PointerPressedEventArgs) void
Starts moving a window with left button being held. Should be called from left mouse button press event handler.
BeginResizeDrag(WindowEdge, PointerPressedEventArgs) void
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
CanResize(bool) void
Enables or disables resizing of the window
Move(PixelPoint) void
Sets the client size of the top level.
Resize(Size) void
Sets the client size of the top level.
SetEnabled(bool) void
Disables the window for example when a modal dialog is open.
SetExtendClientAreaChromeHints(ExtendClientAreaChromeHints) void
Sets hints that configure how the client area extends.
SetExtendClientAreaTitleBarHeightHint(double) void
Sets how big the non-client titlebar area should be.
SetExtendClientAreaToDecorationsHint(bool) void
Sets if the ClientArea is extended into the non-client area.
SetIcon(IWindowIconImpl) void
Sets the icon of this window.
SetMinMaxSize(Size, Size) void
Minimum width of the window.
SetParent(IWindowImpl) void
Sets the parent of the window.
SetSystemDecorations(SystemDecorations) void
Enables or disables system window decorations (title bar, buttons, etc)
SetTitle(string) void
Sets the title of the window.
ShowTaskbarIcon(bool) void
Enables or disables the taskbar icon