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

KeyDown event in floating window

3 Answers 59 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Niels
Top achievements
Rank 1
Niels asked on 24 Oct 2011, 07:42 AM
It seems that a KeyDown event in a floating toolwindow does not bubble up to the root element in the visual tree.
I have an (external) library that attaches an event handler to the keydown event of the RootVisual, but the event is never raised for events that occur within a floating window. 
Can this event somehow be rerouted so that it will (also) be raised by the RootVisual? 

3 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 26 Oct 2011, 09:00 AM
Hello Niels,

The floating windows are hosted in popups, so it is expected the Routed events to not bouble up to the visual root as the Popups have their own visual trees with different roots. Attaching the event handlers to the ToolWindows as well should resolve this problem.

Hope this helps.

Best wishes,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Niels
Top achievements
Rank 1
answered on 26 Oct 2011, 01:12 PM
Thanks, I somewhat expected that to be the cause of the problem. Since I was only experiencing this behaviour with floating windows, and not with docked windows.
Though I am not certain if it worked in the Q1 version, but did this change because the ToolWindows are now (in Q2) derived from RadWindows?

Even so, I will attach event handlers to the ToolWindows and set things in motion from there.
0
Miroslav Nedyalkov
Telerik team
answered on 26 Oct 2011, 01:24 PM
Hi Niels,

You are absolutely right - this change occurred as the ToolWindows and RadWindows now share common base class and before, the ToolWindows were part of the visual tree of the RadDocking control (they were placed inside a Canvas panel, placed inside the ControlTemplate of the RadDocking control).

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Docking
Asked by
Niels
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Niels
Top achievements
Rank 1
Share this question
or