DesktopWindowHostOptions record

Namespace Runic.Desktop · Runic.Desktop 0.7.0-preview.5

public sealed record DesktopWindowHostOptions : IEquatable<DesktopWindowHostOptions>

Inherits or implements IEquatable.

Describes the immutable initial state of an embedded window host.

Remarks

Runic Desktop derives these values from DesktopWindowOptions.

Constructors

DesktopWindowHostOptions

public DesktopWindowHostOptions()

No documentation.

Properties

AllowedPermissions

public DesktopPermissionGrant AllowedPermissions { get; init; }

Gets the sensitive permissions the host may grant, only to the origin of the presented URL.

Centered

public bool Centered { get; init; }

Gets whether the window opens centered on the screen.

CloseRequested

public Action? CloseRequested { get; init; }

When set, suppress user close requests and invoke this callback. CloseAsync must bypass it.

CustomArguments

public string? CustomArguments { get; init; }

Gets additional WebView command-line arguments as one unsplit string, from DesktopWindowOptions.BrowserArguments.

DocumentStartScript

public string? DocumentStartScript { get; init; }

Gets the script a host reporting IDesktopWindowHost.SupportsDocumentStartScript must add before its first navigation. It carries session credentials: do not log, persist, or expose it to page content.

Frameless

public bool Frameless { get; init; }

Gets whether the window opens without a title bar and border.

Height

public uint Height { get; init; }

Gets the initial window height in pixels. Defaults to 600.

Hidden

public bool Hidden { get; init; }

Gets whether the window is created without being shown.

HighContrast

public bool HighContrast { get; init; }

Gets whether the presentation uses a high-contrast theme, already resolved from the system setting when unset.

IconFile

public string? IconFile { get; init; }

Gets the path of the window icon file, or null for the default icon.

Kiosk

public bool Kiosk { get; init; }

Gets whether the window opens full-screen without decorations.

MinimumHeight

public uint? MinimumHeight { get; init; }

Gets the minimum window height in pixels, or null for no minimum.

MinimumWidth

public uint? MinimumWidth { get; init; }

Gets the minimum window width in pixels, or null for no minimum.

ProfilePath

public string? ProfilePath { get; init; }

Gets the WebView profile or user-data directory, or null for the host's default.

Resizable

public bool Resizable { get; init; }

Gets whether the user can resize the window. Defaults to true.

Transparent

public bool Transparent { get; init; }

Gets whether the window has a transparent background where the page does not paint.

Width

public uint Width { get; init; }

Gets the initial window width in pixels. Defaults to 800.

X

public uint? X { get; init; }

Gets the initial horizontal screen position in pixels, or null to let the platform choose.

Y

public uint? Y { get; init; }

Gets the initial vertical screen position in pixels, or null to let the platform choose.