RunicHostedAppearance record

Namespace Runic.Application.Views.Desktop in Runic.Application.Views.Desktop 0.23.0

public sealed record RunicHostedAppearance : IEquatable<RunicHostedAppearance>

Inherits or implements IEquatable.

An appearance override for a hosted region (the Runic host protocol, region-appearance/1): each member that is not null replaces the host's desktop value for the pages of the region's window, such as a wizard step in the design the user picked; null keeps the desktop's value.

Remarks

Set it with RunicHostedRegionOptions.Appearance when the policy embeds the window, or with RunicHostedRegion.SetAppearanceAsync later. The guest merges it with the host's desktop appearance for that window only: windows it owns, the guest's other windows and the host's own pages keep the desktop's. The host page learns only RunicHostedAppearance.ColorScheme, which it sets as the CSS color-scheme of the region's frame or component.

Experimental; see docs/experimental.md.

Constructors

RunicHostedAppearance

public RunicHostedAppearance()

No documentation.

Properties

AccentColor

public DesktopAccentColor? AccentColor { get; init; }

The accent colour; null, the default, for the desktop's.

ColorScheme

public DesktopColorScheme? ColorScheme { get; init; }

DesktopColorScheme.Light or DesktopColorScheme.Dark; null, the default, for the desktop's. DesktopColorScheme.NoPreference reads as null, so a design menu's "System" choice maps to it directly.

Contrast

public DesktopContrast? Contrast { get; init; }

None

public static RunicHostedAppearance None { get; }

No override: every member keeps the desktop's value.

ReducedMotion

public bool? ReducedMotion { get; init; }

Whether the pages reduce motion; null, the default, for the desktop's.

SystemColors

public DesktopSystemColors? SystemColors { get; init; }

The palette the pages show with RunicHostedAppearance.Contrast DesktopContrast.ForcedColors; ignored with any other contrast. With forced colours and null, the desktop's palette when the desktop forces colours too, else none.

TextScale

public double? TextScale { get; init; }

The text size as a factor of the default, from 0.5 to 4; null, the default, for the desktop's.

Exceptions

ArgumentOutOfRangeException

The value is not from 0.5 to 4.