We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting Docking manager attributes

Thread ID:





80809 Apr 28,2009 11:48 AM UTC Apr 29,2009 08:54 AM UTC WPF 4
Tags: Tools
Administrator [Syncfusion]
Asked On April 28, 2009 11:48 AM UTC


In which state can i set both the CanDock and Canclose attributes to false for the Docking manager. Is it possible to hide certain dock panels in the docking manager.


Administrator [Syncfusion]
Replied On April 28, 2009 12:20 PM UTC

In continuation to the previous post, actually i dont need the header to be displayed for the dock panel, so i tried setting the CanClose and CanDock property to false. But it doesnt work, so can you please provide me a solution to solve this and also to hide the dock panels.


Prabhu P [Syncfusion]
Replied On April 28, 2009 04:42 PM UTC

Hi Aishwaria,

Thank you for your interest in Syncfusion products.

1. You can use both CanDock and Canclose methods in document elements and CanDock method will be applicable only when the element is in Floating state. It says whether the float window can dock or not. Similarly Canclose method will be applicable in Dock and Float state docking elements.

2. Yes. It is possible to hide a particular panel [docking element] from the docking container. You can use the following code snippet to hide a particular panel.

DockingManager.SetState(panel, DockState.Hidden);

Usually when we set the hidden state, the visibility of dock element goes to be Collapsed state.

3. If you don’t want to show the header to the Dock elements, you need to set the CanClose and CanDock property to false. You just leave by setting the header to the dock element. Also you may remove the docking manager’s header template from your application.

Please let me know if you have any other questions.


Administrator [Syncfusion]
Replied On April 29, 2009 04:39 AM UTC

I'm unable to set the CanDock and CanClose to false for the dock element as suggested in solution 3.


Balavasanth [Syncfusion]
Replied On April 29, 2009 08:54 AM UTC

Hi Aishwaria,

Thanks for your interests in Syncfusion products.

We would like to explain the usage of the CanDock and CanClose properties first. Please find the below explanations.

CanDock - Determines whether the instance of the DockingManager can dock the specified hosted element, it can be set to False when the state of the Docking Manager is other than in Dock State

CanClose- This property is used to allow or deny change element state to DockState.Hidden. If it is set to false it means element cannot be closed. The default value is true.

If your requirement is that you don’t want the header to be displayed at all for the Dockwindow then you need to make use of the DockHeaderStyle property, set the DockHeaderPresenter visibility to collapsed which will remove the header contents from the dock window. kindly make use of the code snippet for more idea.


or you can set the Noheader property to True also, both the case it will work out. Code snippet


If your requirement is not to display the individual buttons in the header then you need to overwrite the DockHeaderPresenterTemplate, we tried a simple sample in which we tried to overwrite the buttons in the header. Kindly download the sample from the following location for more information.


Please let us know still if you have any queries.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon