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. Image for the cookie policy date
close icon

Setting Docking manager attributes

Hi,

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.

Regards,
Aishwaria



4 Replies

AD Administrator Syncfusion Team 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.

Regards,
Aishwaria



PP Prabhu P Syncfusion Team 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.

Regards,
Prabu







AD Administrator Syncfusion Team 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.

Regards,
Aishwaria



BA Balavasanth Syncfusion Team 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.

[XAML]









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

[XAML]




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.

http://files.syncfusion.com/support/Tools.WPF/7.2.0.20/Forum-80809/main.htm

Please let us know still if you have any queries.

Regards,
Bala.



Loader.
Live Chat Icon For mobile
Up arrow icon