Issue with dockable windows

2 posts, 0 answers
  1. Edouard
    Edouard avatar
    1 posts
    Member since:
    Feb 2008

    Posted 04 Feb 2008 Link to this post


    I am using the CAB Enabling Kit in my test application. I've added two docked windows to the Dockable Workspace:

    this.Workspaces[WorkspaceNames.DockableWorkspace].Show(view1, smartPartInfo1);
    this.Workspaces[WorkspaceNames.DockableWorkspace].Show(view2, smartPartInfo2);

    I can see both windows and they are both functional.
    Next, if I try to close one of these windows (by clicking its [x] button) the both are closed!
    That is wrong because the user wants to close just one and to keep the second one opened.

    After some investigation, I've found the reason of this wrong behavior.
    When you click the Close button, the RadDockableWorkspace.dockManager_DockingStateChanging/Changed
    pair of events raised TWICE(!). For the first time, with the sender = dockingManager, and for the second,
    with the sender = DockPanel (= the window you are closing).

    So, the first time, it is the dockingManager.Hide() method called.
    I think it closes ALL docked windows.

    I've made some changes in RadDockableWorkspace.dockManager_DockingStateChanging/Changed code
    to run the right Hide() method of the only window being closed.

    (sender as Control).Hide()
    (e.DockObject as Control).Hide()

    After this change, the behavior of my two windows is as expected
    but I am not sure that I found the good fixing up of the problem,
    because I need to recomplie the Telerik.CAB.WinForms dll.

    Could you please help me to get the right solution of the problem?


  2. Jordan
    Jordan avatar
    547 posts

    Posted 06 Feb 2008 Link to this post

    Hello Edouard,

    Thank you for writing.
    Indeed, the behavior that you describe is not correct. The event with dockingManager as sender, should not be fired in your case.

    A possible workaround could be to ignore this event if the sender is the docking manager.

    We have logged this issue and it will be fixed for the 2008 Q1 release.

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
Back to Top