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

Issue with dockable windows

1 Answer 41 Views
CAB Enabling Kit
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Edouard asked on 04 Feb 2008, 06:08 PM


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?


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 06 Feb 2008, 11:58 AM
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
CAB Enabling Kit
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question