Class WindowHelper
Helper for showing WPF windows in a separate STA thread
Inherited Members
Namespace: CAMAPI.DotnetHelper
Assembly: CAMAPI.DotnetHelper.dll
Syntax
public static class WindowHelper
Methods
ShowStaWindow<TWindow>(long, Func<TWindow>, Action?, Action<Exception>?)
Show a WPF window in a separate STA thread
Declaration
public static void ShowStaWindow<TWindow>(long ownerHandle, Func<TWindow> createWindow, Action? onClosed = null, Action<Exception>? onException = null) where TWindow : Window, IDisposable
Parameters
| Type | Name | Description |
|---|---|---|
| long | ownerHandle | Handle of the owner window |
| Func<TWindow> | createWindow | Delegate to create the window instance |
| Action | onClosed | Delegate called when the window is closed |
| Action<Exception> | onException | Delegate called if an exception occurs |
Type Parameters
| Name | Description |
|---|---|
| TWindow |