New to Telerik UI for WPF? Download free 30-day trial

Undocking a RadPane in WinForms Hosted WPF UserControl, Text Cannot be Entered to a TextBox Inside the Pane

Environment

Product RadDocking for WPF

Description

Keyboard input doesn't work in RadPane if hosted in WinForms application and undocked.

Solution

Subscribe to the PaneStateChanged event of RadDocking and enable modeless keyboard interoperability for the Window hosting the floating pane.

private void RadDocking_PaneStateChange(object sender, Telerik.Windows.RadRoutedEventArgs e) 
{ 
    var pane = e.OriginalSource as RadPane; 
    if (pane != null && pane.IsFloating) 
    { 
        var window = Window.GetWindow(pane); 
        System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(window); 
    } 
} 
In this article