RunicWindowPlacement record

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

public sealed record RunicWindowPlacement : IEquatable<RunicWindowPlacement>

Inherits or implements IEquatable.

A Window's placement: the bounds it restores to (when it is neither maximized nor full-screen) and whether it is maximized or full-screen, for IRunicWindowPresentation.Placement and IRunicWindowPresentation.SetPlacementAsync.

Remarks

The values use the units of the Window's host, so a placement read from a Window and saved places a Window of the same host where it was; save it per host rather than convert it:

  • On Runic Desktop, those of DesktopWindowPlacement as DesktopWindowState.Placement reports it: on Windows RunicWindowPlacement.X and RunicWindowPlacement.Y are physical pixels of the virtual screen and RunicWindowPlacement.Width and RunicWindowPlacement.Height device-independent pixels of the outer frame; on macOS points, the top-left corner of the frame and the content size; on Linux logical pixels, the frame's corner and the content size, and no position on Wayland. Runic.Application.Views.Desktop converts with ToRunicPlacement() and ToDesktopPlacement().
  • In WPF, device-independent pixels for all four values: Window.Left, Top, Width and Height of the restored window.
  • For a host application's window, the host's units.

An open side panel is not part of the bounds: they are those of the Window's page.

Constructors

RunicWindowPlacement

public RunicWindowPlacement()

No documentation.

Properties

FullScreen

public bool FullScreen { get; init; }

Gets whether the Window is full-screen.

Height

public int Height { get; init; }

Gets the height of the restored Window; zero or less keeps the current height.

Maximized

public bool Maximized { get; init; }

Gets whether the Window is maximized (zoomed on macOS).

Width

public int Width { get; init; }

Gets the width of the restored Window; zero or less keeps the current width.

X

public int? X { get; init; }

Gets the horizontal position of the restored Window, or null where there is none or to keep it.

Remarks

Set together with RunicWindowPlacement.Y.

Y

public int? Y { get; init; }

Gets the vertical position of the restored Window, or null where there is none or to keep it.

Remarks

Set together with RunicWindowPlacement.X.