Enables a Window to receive keyboard messages correctly when it is opened modelessly from Windows Forms.
<PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _ Public Shared Sub EnableModelessKeyboardInterop ( _ window As Window _ )
Dim window As Window ElementHost.EnableModelessKeyboardInterop(window)
[PermissionSetAttribute(SecurityAction.Demand, Name = "FullTrust")] public static void EnableModelessKeyboardInterop( Window window )
[PermissionSetAttribute(SecurityAction::Demand, Name = L"FullTrust")] public: static void EnableModelessKeyboardInterop( Window^ window )
public static function EnableModelessKeyboardInterop( window : Window )
You cannot use methods in XAML.
Call the EnableModelessKeyboardInterop method to forward all keyboard messages when a WPF window is opened modelessly. The EnableModelessKeyboardInterop method installs a message filter in the Windows Forms-based application. The filter forwards all keyboard messages when the modeless window is active.
for full trust for all callers higher in the call stack. This member cannot be used by partially trusted code.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003