KeyDown event in floating window

4 posts, 0 answers
  1. Niels
    Niels avatar
    4 posts
    Member since:
    Oct 2011

    Posted 24 Oct 2011 Link to this post

    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? 
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 26 Oct 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Niels
    Niels avatar
    4 posts
    Member since:
    Oct 2011

    Posted 26 Oct 2011 Link to this post

    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.
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 26 Oct 2011 Link to this post

    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 >>

Back to Top