Declined
Last Updated: 18 Nov 2016 17:11 by Taylor
Taylor
Created on: 13 Oct 2016 18:03
Category: UI for WPF
Type: Feature Request
1
undocked radpane will not receive text input when wpf window is hosted in winforms app
I have a Winforms application (Very Large so there is no changing it any time soon) that launches a WPF window with a .show(). In this WPF window I have radDocking. In one of the RadPanes I have a WPF TextBox. As long as the RadPane is docked the TextBox will receive text. However, if I undock, the TextBox will no longer receive text input.
I do not see this issue, however, when launching the WPF window in my WPF test app.

Please let me know if there is some kind of work around for this issue.

I have attached a test app that I have created which will demonstrate the issue. You will have to point the "TextBoxInRadPanel"  to your Telerik DLLs, they were too big to attach.

Repro Steps:
1. Launch the HostApp
2. Click the "Press Me" button
3. Type into the TextBox in the docked "UC Test" RadPane - input is received
3. Undock the "UC Test" RadPane
4. Attempt to type into the TextBox area - no text input will be received.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
3 comments
Taylor
Posted on: 18 Nov 2016 17:11
That solution worked great, thank you very much.
Taylor
Posted on: 17 Nov 2016 18:54
Thank you Kalin,

I'll give your suggestion a try and respond with the results.

Taylor
ADMIN
Kalin
Posted on: 16 Nov 2016 09:07
Hi Taylor,

The attachment is missing, so I cannot provide exact solution for this behavior. However basically you would need call the ElementHost.EnableModelessKeyboardInterop() method and pass the WPF window instance that hosts our ToolWindow after gets loaded. This can be done if you hook to the ToolWindowCreated event of RadDocking and implement the following logic:

private void RadDocking_ToolWindowCreated(object sender, ElementCreatedEventArgs e)
{
    var toolWindow = e.CreatedElement as ToolWindow;
    toolWindow.Loaded += toolWindow_Loaded;
}

private void toolWindow_Loaded(object sender, RoutedEventArgs e)
{
    var window = Window.GetWindow(sender as ToolWindow);
    System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(window);
}

Hope this helps.
Kalin