public sealed class DesktopBridgeWindow<TViewModel> : IBridgeWindow, IAsyncDisposable where TViewModel : class 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
InvalidOperationExceptionThe 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; } 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
ArgumentOutOfRangeExceptiontimeoutis negative and not infinite.
Documentation from IBridgeWindow.CloseAsync.
DisposeAsync
public ValueTask DisposeAsync() Closes the window immediately and waits until its resources are released.