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

Issue with dockable windows

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

Hello,

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.

Replace
(sender as Control).Hide()
with
(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
0
Jordan
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.

Regards,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
CAB Enabling Kit
Asked by
Edouard
Top achievements
Rank 1
Answers by
Jordan
Telerik team
Share this question
or