C# Класс AdvancedLauncher.Tools.Interop.HwndHostEx

This class works around issues with the HwndHost in current WPF versions.
Наследование: System.Windows.Interop.HwndHost, IKeyboardInputSink
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
AsyncUpdateWindowPosProperty System.Windows.DependencyProperty
CopyBitsBehaviorProperty System.Windows.DependencyProperty
RaiseMouseActivateCommandProperty System.Windows.DependencyProperty

Защищенные методы

Метод Описание
BuildWindowCore ( HandleRef hwndParent ) : HandleRef
BuildWindowOverride ( HWND hwndParent ) : HWND

Default implementation of BuildWindowOverride, which just creates a simple "STATIC" HWND. This is almost certainly not the desired window, but at least something shows up on the screen. Override this method in your derived class and build the window you want.

DestroyWindowCore ( HandleRef hwnd ) : void
DestroyWindowOverride ( HWND hwnd ) : void

Default implementation of DestroyWindowCore, which just destroys the hosted window. If this is undesirable, override this method and provide alternative logic.

OnWindowPositionChanged ( Rect rcBoundingBox ) : void

WndProc ( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool &handled ) : IntPtr
WndProcOverride ( HWND hwnd, WM msg, IntPtr wParam, IntPtr lParam ) : IntPtr

Описание методов

BuildWindowCore() защищенный закрытый Метод

protected final BuildWindowCore ( HandleRef hwndParent ) : HandleRef
hwndParent System.Runtime.InteropServices.HandleRef
Результат System.Runtime.InteropServices.HandleRef

BuildWindowOverride() защищенный Метод

Default implementation of BuildWindowOverride, which just creates a simple "STATIC" HWND. This is almost certainly not the desired window, but at least something shows up on the screen. Override this method in your derived class and build the window you want.
protected BuildWindowOverride ( HWND hwndParent ) : HWND
hwndParent AdvancedLauncher.Tools.Win32.User32.HWND
Результат AdvancedLauncher.Tools.Win32.User32.HWND

DestroyWindowCore() защищенный закрытый Метод

protected final DestroyWindowCore ( HandleRef hwnd ) : void
hwnd System.Runtime.InteropServices.HandleRef
Результат void

DestroyWindowOverride() защищенный Метод

Default implementation of DestroyWindowCore, which just destroys the hosted window. If this is undesirable, override this method and provide alternative logic.
protected DestroyWindowOverride ( HWND hwnd ) : void
hwnd AdvancedLauncher.Tools.Win32.User32.HWND
Результат void

OnWindowPositionChanged() защищенный Метод

protected OnWindowPositionChanged ( Rect rcBoundingBox ) : void
rcBoundingBox System.Windows.Rect
Результат void

WndProc() защищенный закрытый Метод

protected final WndProc ( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool &handled ) : IntPtr
hwnd System.IntPtr
msg int
wParam System.IntPtr
lParam System.IntPtr
handled bool
Результат System.IntPtr

WndProcOverride() защищенный Метод

protected WndProcOverride ( HWND hwnd, WM msg, IntPtr wParam, IntPtr lParam ) : IntPtr
hwnd AdvancedLauncher.Tools.Win32.User32.HWND
msg WM
wParam System.IntPtr
lParam System.IntPtr
Результат System.IntPtr

Описание свойств

AsyncUpdateWindowPosProperty публичное статическое свойство

Specifies whether or not to set the window position of the hosted window asynchronously.
HwndHost depends on the LayoutUpdated event to synchronize the position of the HWND with the layout slot. However, when WPF gets into a recursive/nested layout loop, the LayoutUpdated event is not raised. Since we resize the hosted HWND in response to this event, if the hosted HWND contains an HwndSource, that HwndSource will run an immediate layout pass, but the LayoutUpdated event will not be raised. TODO: fix in 4.5?
public static DependencyProperty,System.Windows AsyncUpdateWindowPosProperty
Результат System.Windows.DependencyProperty

CopyBitsBehaviorProperty публичное статическое свойство

The behavior for handling of the SWP_NOCOPYBITS flag during moving or sizing operations.
Real implementation is HwndHostExtensions.CopyBitsBehaviorProperty
public static DependencyProperty,System.Windows CopyBitsBehaviorProperty
Результат System.Windows.DependencyProperty

RaiseMouseActivateCommandProperty публичное статическое свойство

Specifies whether or not a HwndHostCommands.MouseActivate command is raised in response to WM_MOUSEACTIVATE.
Real implementation is HwndHostExtensions.RaiseMouseActivateCommandProperty
public static DependencyProperty,System.Windows RaiseMouseActivateCommandProperty
Результат System.Windows.DependencyProperty