Class ExtensionWindowLazyUnloadable
Wrapper over extension, so there can be created a non-modal window and disposing is correct
Implements
Inherited Members
Namespace: CAMAPI.DotnetHelper
Assembly: CAMAPI.DotnetHelper.dll
Syntax
public class ExtensionWindowLazyUnloadable : IExtensionLazyUnloadable
Constructors
ExtensionWindowLazyUnloadable()
Declaration
public ExtensionWindowLazyUnloadable()
Properties
CanUnload
Allow unloading only when a window is closed
Declaration
public bool CanUnload { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
OwnerHandle
Handle of the owner window
Declaration
public long OwnerHandle { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
Methods
SetOwnerHandle(ComWrapper<ICamApiApplication>)
Set the owner window handle from the main application window
Declaration
public void SetOwnerHandle(ComWrapper<ICamApiApplication> applicationCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiApplication> | applicationCom |
ShowWindow<TWindow>(Func<TWindow>, Action?, Action<Exception>?)
Show a WPF window in a separate STA thread
Declaration
public void ShowWindow<TWindow>(Func<TWindow> createWindow, Action? onClosed = null, Action<Exception>? onException = null) where TWindow : Window, IDisposable
Parameters
| Type | Name | Description |
|---|---|---|
| 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 |