WpfBridgeView<TViewModel> class

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

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

Inherits or implements IBridgeWindow, IAsyncDisposable.

Owns one child presentation and Bridge session while borrowing an application's existing model and services.

Properties

Surface

public DesktopSurface Surface { get; }

The existing Desktop runtime surface serving this child presentation.

ViewModel

public TViewModel ViewModel { get; }

The exact application-owned model supplied during creation.

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()

Releases owned presentation resources after accepted operations finish; borrowed models and services stay alive.

OpenAsync

public ValueTask OpenAsync(DesktopWindowOptions? options = null, CancellationToken cancellationToken = default)

Opens the child presentation after its RunicWebView enters the loaded WPF visual tree.

Remarks

Only the embedded presentation is accepted. Native window layout belongs to WPF.