This is a migrated thread and some comments may be shown as answers.

RadDock.FakePopup steals my focus

5 Answers 132 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Yu
Top achievements
Rank 1
Yu asked on 06 Apr 2011, 11:12 AM
Hi,

I'm trying to add context help to my application following the method described here
http://www.codeproject.com/Articles/36117/Easy-help-with-WPF.aspx

In the main window I'm using the RadDocking to host some children views. I'm following the standard procedures described in the RadDocking document, using DocumentHost, RadSplitContainer and RadPaneGroup.

When I start the app and press the F1 button without clicking anything else, I expect the mouse click to be originated from the main Window. But when I debug I found that the sender of the keyboard input is from a Telerik.Windows.Controls.RadDock.FakePopup.

I can't find any document regarding this class. And I have no idea what it is and why it took the keyboard focus by default after my app starts.

One thing for sure is, it's invisible.

The only solution is to click somewhere on my main window first to get the focus back to where it should be. Then my F1 works as normal.

Can anyone help with it? Why RadDocking brings a FakePopup in my app and set it on focus? Is it something to do with the floating mode of the dockable panes? Urgently waiting for answers. 

Many thanks!

P.S. I'm going to prepare a demo solution to showcase the point. But actually it's very easy to reproduce. You just need to enable the context help and add a normal RadDocking control in the main window, then put a break point at the HelpProvider's Execute method. During runtime, check the sender and you will see the FakePopup. 

5 Answers, 1 is accepted

Sort by
0
Yu
Top achievements
Rank 1
answered on 11 Apr 2011, 04:33 AM
I had the demo project ready. But seems I can't attach project source code here. If you need I can send to you directly through email.
0
George
Telerik team
answered on 11 Apr 2011, 01:58 PM
Hi Yu,

 
I tried to reproduce the problem, but to no avail. Attached you can find the sample. 
When the application is started, I press F1 with no clicking on the main window. Every time the Executed handler executes.

Please, let me know if I miss something.

Regards,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Yu
Top achievements
Rank 1
answered on 12 Apr 2011, 05:16 AM
Hi George,

Thanks for the reply and the sample solution. But the problem is not with the Executed handler. It always executes.

Again, I have the solution to reproduce the problem. But I don't know how to attach it here.

Anyway, using your sample solution, here's how to reproduce the problem. 

1. Remove the two children RadPanes (since in my app I need the RadDocking to be empty at start)
2. Put a break point at the first line inside the Executed handler
3. Start Debugging, when the main window shows up, press F1
4. When it breaks, check the "sender" of the Executed handler. (It should be of type Telerik.Windows.Controls.Docking.FakePopup)

I need the main window to have the focus at start because my help file definition is associated with it. If the Executed is originated from this don't-know-what-thing ("FakePopup"), my help file can't be found, and the Executed will throw an exception.

Here's another link inside this forum, posted November last year, which is regarding same issue. 

Transparent docking window keeps/steals focus

The reply (I guess also from you) mentioned that there will be major changes on RadDocking in Q1 of 2011. So I downloaded the latest RadControl (RadControl_for_WPF40_2011_1_0315_Dev.msi) and tried. The above issue still remains.

Actually the fix is very simple, according to your suggestion in the above thread, I added "ContentRendered += (s, e) => Focus();" inside the MainWindow constructor to get the focus back. So for me this problem is solved.

But this "FakePopup" is still a mystery.
0
Yu
Top achievements
Rank 1
answered on 12 Apr 2011, 07:56 AM
0
Pana
Telerik team
answered on 18 Apr 2011, 07:15 AM
Hi,

I have managed to reproduce the issue. The "Fake Popup" is an implementation of a feature similar to the adorner layer and decorator. The RadPanes and ToolWindows when floating are placed in that popup. It is an issue in the design of the RadDocking control. We are not sure if we will be able to fix it as it will introduce a lot of changes through the control.

Thank you very much for your feedback and demo project.

All the best,
Pana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Docking
Asked by
Yu
Top achievements
Rank 1
Answers by
Yu
Top achievements
Rank 1
George
Telerik team
Pana
Telerik team
Share this question
or