Helper object for C# Class Libraries being unable to get the current WPF window handle.
More...
|
static IntPtr | GetWindowHandle (Window wnd) |
| Gets the primary WPF window's handle.
This uses WindowInteropHelper.EnsureHandle to ensure that a valid handle is always returned at any point during initialization. More...
|
|
static IntPtr | GetWindowHandle () |
|
static HwndSource | GetHwndSource (IntPtr hWnd) |
| Gets the HwndSource associated with the given Window Handle hWnd . More...
|
|
Helper object for C# Class Libraries being unable to get the current WPF window handle.
This can be used to receive window messages for the current window even from within non-WPF projects.
◆ GetHwndSource()
static HwndSource VolumeControl.WPF.WindowHandleGetter.GetHwndSource |
( |
IntPtr |
hWnd | ) |
|
|
static |
Gets the HwndSource associated with the given Window Handle hWnd .
- Parameters
-
hWnd | The IntPtr associated with a WPF window. |
- Returns
- HwndSource that can be used to receive WPF window messages.
◆ GetWindowHandle() [1/2]
static IntPtr VolumeControl.WPF.WindowHandleGetter.GetWindowHandle |
( |
| ) |
|
|
static |
Without parameters, this function uses the main window's handle using the Application.MainWindow property from Application.Current.
◆ GetWindowHandle() [2/2]
static IntPtr VolumeControl.WPF.WindowHandleGetter.GetWindowHandle |
( |
Window |
wnd | ) |
|
|
static |
Gets the primary WPF window's handle.
This uses WindowInteropHelper.EnsureHandle to ensure that a valid handle is always returned at any point during initialization.
- Returns
- IntPtr set to the current WPF window's handle.
The documentation for this class was generated from the following file: