Table of Contents

Interface IWindow

Namespace
Xui.Core.Actual
Assembly
Xui.Core.dll

Represents a platform-specific window implementation used by the Xui runtime. Each platform (e.g., Windows, macOS, iOS) must provide an implementation of this interface to manage window lifecycle, rendering, and input.

This interface is typically paired with an abstract window in the Xui framework, and is not used directly by application developers.

public interface IWindow

Properties

RequireKeyboard

Gets or sets whether the window currently requires keyboard input focus. Platforms may use this to show or hide on-screen keyboards.

bool RequireKeyboard { get; set; }

Property Value

bool

TextMeasureContext

Gets a lightweight text measure context for hit-testing text positions during pointer events. Returns null on platforms that do not support it.

ITextMeasureContext? TextMeasureContext { get; }

Property Value

ITextMeasureContext

Title

Gets or sets the window title, where supported by the platform (e.g., desktop).

string Title { get; set; }

Property Value

string

Methods

Close()

Closes and destroys the platform window. Called when the abstract window is disposed programmatically rather than through a user-initiated close gesture. The default implementation is a no-op for platforms that do not support imperative close.

void Close()

GetService(Type)

Returns platform-provided services for this window (e.g. IImagePipeline). Called by the abstract Window after exhausting its own DI service provider. Implementations must never call back into the abstract window.

object? GetService(Type serviceType)

Parameters

serviceType Type

Returns

object

Invalidate()

Requests a redraw of the window surface. The platform should trigger a paint or render callback as soon as possible.

void Invalidate()

Show()

Displays the window to the user. This may include making it visible, entering the main loop, or attaching it to the application's view hierarchy, depending on the platform.

void Show()