DesktopBridgeWindow<TViewModel> class

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

public sealed class DesktopBridgeWindow<TViewModel> : IBridgeWindow, IAsyncDisposable where TViewModel : class

Inherits or implements IBridgeWindow, IAsyncDisposable.

Owns one Desktop surface, presentation, ViewModel scope, and Views session.

Properties

NativeOwner

public DesktopNativeOwner NativeOwner { get; }

The native platform-service owner of the opened presentation.

Exceptions

InvalidOperationException

The presentation has not opened yet.

Remarks

Pass it to the platform provider for the window's backend for file dialogs, file launchers and clipboard access. It is available while the embedded window is open. A presentation without native dispatch, such as an installed browser after an embedded-window fallback, still has an owner, but its DesktopNativeOwner.IsAvailable is false.

Presentation

public DesktopWindow Presentation { get; }

The opened Desktop window.

Exceptions

InvalidOperationException

The presentation has not opened yet.

Surface

public DesktopSurface Surface { get; }

The Desktop surface that hosts the window's web content.

ViewModel

public TViewModel ViewModel { get; }

The window's scoped root ViewModel.

Methods

CloseAsync

public ValueTask<BridgeWindowCloseResult> CloseAsync(TimeSpan timeout)

Stops new operation admission and waits up to timeout for accepted work. At the timeout the visible window and its browser routes close promptly, while the host keeps its scope until the remaining operations finish. The first call selects the timeout; later calls return the same result.

Exceptions

ArgumentOutOfRangeException

timeout is negative and not infinite.

Documentation from IBridgeWindow.CloseAsync.

DisposeAsync

public ValueTask DisposeAsync()

Closes the window immediately and waits until its resources are released.