public sealed record RunicWindowOptions : IEquatable<RunicWindowOptions> Host-neutral options for one Window. Every host reads the same values.
Constructors
RunicWindowOptions
public RunicWindowOptions() No documentation.
Properties
CloseDrain
public RunicCloseDrain? CloseDrain { get; init; } How long the Window stays visible after its close was decided, while its accepted work drains (RunicCloseDrain). null, the default, takes the host's default, which is RunicCloseDrain.None unless the host's options set another.
Remarks
Hosts read it when the window opens. Runic Desktop's embedded windows (RunicDesktopHostOptions.CloseDrain), a hosted application's Windows and RunicWindowTestHost (RunicWindowTestHostOptions.CloseDrain) drain. A presentation that cannot keep its window open, such as an installed browser, serve-only mode or CS-WebUI, closes it at once and logs WindowCloseDrainUnavailable (event 1055); the Window's scope still waits for durable work. Operations keep their RunicOperationClose under every host.
ContentRoot
public string? ContentRoot { get; init; } The directory of the built frontend. null, the default, is the web root next to the application (AppContext.BaseDirectory), where the Runic build places it: www, or the directory that the build property RunicApplicationFrontendWebRoot names. On macOS, an application in a bundle without that directory uses Contents/Resources/www (or the web root), where a bundle keeps it.
FlowCultureFromLocale
public bool? FlowCultureFromLocale { get; init; } Whether the window's bridged invocations, such as its commands, setters and validation, run with CultureInfo.CurrentCulture and CurrentUICulture of the window's locale (WindowContentSessionOptions.FlowCultureFromLocale). null, the default, takes the host's option, which keeps the process's cultures unless set. Hosts read it when the window opens.
Height
public int? Height { get; init; } The initial height in pixels, or null for the host's default.
IncludeFailureDetail
public bool? IncludeFailureDetail { get; init; } Whether the window's Bridge error replies carry the exception type, message and stack (WindowContentSessionOptions.IncludeFailureDetail). null, the default, includes them only in a Development environment. Hosts read it when the window opens.
MaximumInputBytes
public int? MaximumInputBytes { get; init; } The largest Bridge input of the window, in UTF-8 bytes (WindowContentSessionOptions.MaximumInputBytes), between 1 KiB and 64 MiB. null, the default, uses the host's default, or else 1 MiB. Hosts read it when the window opens.
MaximumPendingUploadBytes
public long? MaximumPendingUploadBytes { get; init; } The most bytes that the window's unclaimed uploads may take at once (WindowContentSessionOptions.MaximumPendingUploadBytes), at least 1 KiB. null, the default, is 1 GiB.
MaximumUploadBytes
public long? MaximumUploadBytes { get; init; } The largest file the page may upload to the window (WindowContentSessionOptions.MaximumUploadBytes), at least 1 KiB. null, the default, uses the host's default, or else 256 MiB.
Modality
public RunicWindowModality Modality { get; init; } Whether the Window blocks its RunicWindowOptions.Owner while it is open. The default is RunicWindowModality.None; RunicWindowModality.Window needs an RunicWindowOptions.Owner.
Remarks
A window-modal Window keeps the owner from taking input, and from being closed by the user, while it is shown: on Windows the owner is disabled, on macOS the Window is the owner's sheet (a second one is queued until the first ends, and a sheet has no close button, so its page needs a Cancel), and on Linux the owner's GTK window is insensitive. The application's other Windows stay usable. IRunicWindowService.ActivateAsync of the owner brings the modal Window forward too.
Owner
public IRunicWindow? Owner { get; init; } The open Window this Window belongs to, or null, the default, for a Window of its own. A ViewModel names its own Window with IRunicWindowContext.Window.
Remarks
On Runic Desktop an owned Window stays above its owner, has no taskbar button of its own, and hides and shows with it. A guarded owner's close asks its owned Windows' guards first, innermost first; any other close of the owner closes them without asking. See DesktopWindowOptions.Owner. A host that cannot own Windows, such as CS-WebUI, a browser fallback or serve-only mode, opens it on its own and logs WindowOwnerIgnored (event 1180); the owner's IRunicWindowPresentation.Features include RunicWindowPresentationFeatures.OwnedWindows where it can. The owner must be open and opened by the same host.
StartPage
public string StartPage { get; init; } The page to open, relative to RunicWindowOptions.ContentRoot. The default is index.html.
Width
public int? Width { get; init; } The initial width in pixels, or null for the host's default.
Methods
ResolveContentRoot
public string ResolveContentRoot() Gets RunicWindowOptions.ContentRoot, or the web root (www unless the build names another) next to the application. On macOS, when the application runs from a bundle's Contents/MacOS and that directory does not exist, gets the bundle's Contents/Resources/www: Apple expects only code in Contents/MacOS.