RunicSidePanelOptions record

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

public sealed record RunicSidePanelOptions : IEquatable<RunicSidePanelOptions>

Inherits or implements IEquatable.

What IRunicWindowPresentation.OpenSidePanelAsync opens: a page of the Window shown beside its page, in a strip on one edge by which the Window grows.

Constructors

RunicSidePanelOptions

public RunicSidePanelOptions()

Obsolete. Constructors of types with required members are not supported in this version of your compiler.

Fields

MinimumWidth

public const int MinimumWidth = 120

The smallest RunicSidePanelOptions.Width, in device-independent pixels.

Properties

Edge

public RunicSidePanelEdge Edge { get; init; }

Gets the edge of the Window that grows: RunicSidePanelEdge.End, the default, is the right edge of a left-to-right Window and the left edge of a right-to-left one.

LoadTimeout

public TimeSpan LoadTimeout { get; init; }

Gets how long the panel's page may take to load before the Window grows; ten seconds by default. A page that does not load in time refuses the panel with RunicSidePanelRefusal.LoadFailed.

Path

public required string Path { get; init; }

Gets the page the panel shows: a route of the application's own frontend, relative to the address the Window's page opened with, such as side-panel, /side-panel, side-panel?tab=log or #/side-panel for a hash router.

Remarks

The panel's page is a second connection of the same Window, so it binds to the Window's ViewModel tree, for example to a SidePanel property of the root ViewModel. It does not follow or drive the Window's navigation path. An absolute URL, a scheme or a path that leaves the page's directory (..) throws ArgumentException.

Width

public required int Width { get; init; }

Gets the panel's width in the Window's units: device-independent pixels on Windows, points on macOS, logical pixels on Linux. At least RunicSidePanelOptions.MinimumWidth; a width over half the monitor's work area is refused with RunicSidePanelRefusal.NoRoom.