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

Switch between docking and non-docking modes?

Thread ID:

Created:

Updated:

Platform:

Replies:

34609 Sep 13,2005 03:39 PM UTC Sep 23,2005 08:23 AM UTC WinForms 13
loading
Tags: Tools
Administrator [Syncfusion]
Asked On September 13, 2005 03:39 PM UTC

Hi, I have a simple 3 panel form - 2 panels side by side occupying the full width of the form, and another panel below them, also occupying the full width. Now if I set DockingManager.DockTofill = true, I get nice runtime behaviour where the panel all fill the available space as the user drags the splitters between the panels. However, I also want to provide the user with two modes of operation: 1) Simple Mode: the panels should not be dockable to any part of the form apart from their design-time position. 2) Advanced Mode: I want to programmatically set DockToFill = false, and allow the user full access to all the docking features. I don''t seem to be able to do either of these. In case 1), the user can still dock the panels to other parts of the form. In case 2), setting DockToFill = false does not have any effect - the windows still fill the available space. Is there any way to achieve these? Thanks Akash

Vijayanand S [Syncfusion]
Replied On September 14, 2005 08:37 AM UTC

Hi Akash, Please take a look at this sample which contains Three Panels and Mode menu. You could choose any mode from the menu before testing your corresponding case scenario. Case 1) You could prevent the docking window from docking to any other side by cancelling the DockAllow event. (I have illustrated this in the attached sample) Case 2) I was not able to see this problem. Please check it with this attached sample and let me know with the reproduced steps or modify this sample and sent it over to me. We appreciate your interest in Syncfusion products. Thanks, Vijay

Administrator [Syncfusion]
Replied On September 14, 2005 09:17 AM UTC

Vijay, I''ve attached some screenshots to show you what happens when I run the sample: 1) Simple mode is fine 2) When I switch to advanced mode something odd happens to the width of the docking area 3) When I undock panel2 in advanced mode, panel 1 expands to fill the remaining area i.e. DockToFill still seems to be operating. I''m using v3.201.1. Thanks Akash >Hi Akash, > >Please take a look at this sample which contains Three Panels and Mode menu. You could choose any mode from the menu before testing your corresponding case scenario. > >Case 1) You could prevent the docking window from docking to any other side by cancelling the DockAllow event. (I have illustrated this in the attached sample) > >Case 2) I was not able to see this problem. Please check it with this attached sample and let me know with the reproduced steps or modify this sample and sent it over to me. > >We appreciate your interest in Syncfusion products. > >Thanks, >Vijay images_852.zip

Vijayanand S [Syncfusion]
Replied On September 15, 2005 06:25 AM UTC

Hi Akash, I am afraid, The behaviour that you desire is not possible to achive using the current version of docking manager. The current behavior of DockingManager is modelled after Visual Studio.NET 2003 editor Docking control behaviour. Please take a look at this Flash file which contains the VS.NET Editor behaviour for this scenario. Thanks for using Syncfusion Product. Regards, Vijay

Administrator [Syncfusion]
Replied On September 19, 2005 03:39 PM UTC

Thanks Vijay, Maybe you can help with a related problem. I want a three panel display as described earlier (two panels next to each other, occupying full width; a thris panel below them also occupying full width), with DockToFill set to true. I also want the top left panel to hide to the left when unpinned, the top right panel to hide to the right, and the bottom panel to hide to the bottom. I cannot seem to achieve this via the designer - the bottom panel always hides to the left. I can *sometimes* achieve this at runtime by rearranging the panels, but I cannot do it with any regularity. What is the sequence of steps I need to follow to achieve this layout? Thanks Akash

Vijayanand S [Syncfusion]
Replied On September 20, 2005 04:47 AM UTC

Hi Akash, This was an already known issue and was fixed. Docking Manager should support dock panels hiding to any side during the designmode when the DockToFill property has been set to true. But currently, the fix seems to be broken in the new release. I have created a bug report regarding this issue DockToFill Designer Bug : All windows get docked to the left - Bug Fix was broken and we will try our very best to address this at the earliest. You could track the progress of this bug fix at the above link. You could follow this below code snippet as a workaround for this issue and take a look at the attached test sample : private void dockingManager1_NewDockStateEndLoad(object sender, System.EventArgs e) { this.dockingManager1.DockControl(this.panel1,this,Syncfusion.Windows.Forms.Tools.DockingStyle.Left,150); this.dockingManager1.DockControl(this.panel2,this,Syncfusion.Windows.Forms.Tools.DockingStyle.Right,225); this.dockingManager1.DockControl(this.panel3,this,Syncfusion.Windows.Forms.Tools.DockingStyle.Bottom,190); } Please let me know if this meets your requirements. We regret for the inconvenience caused. Thanks for your patience. Regards, Vijay

Administrator [Syncfusion]
Replied On September 20, 2005 08:58 AM UTC

Thanks Vijay, The workaround did the trick. Akash

Administrator [Syncfusion]
Replied On September 20, 2005 01:57 PM UTC

Sorry Vijay, Another problem: the above example doesn''t persist the state correctly when I set PersistState = true. How do I get persistence to work with this sample? Akash

Vijayanand S [Syncfusion]
Replied On September 20, 2005 03:13 PM UTC

Hi Akash, If we have set PersistState=true to the Docking Manager, it will load the previous status on just before the NewDockStateEnd Load event. In my previous sample we change the state of the window in the NewDockStateEndLoad event. So I the persisted state will overwrite by our new alignment in NewDockStateEnd Load event. For this particular scenario this workaround will not use. Please calrify me whether you want to load the persisted dockstate every time or you want to load whenever you need. If you want to load whenever you need, please you could you the AppStateSerializer class to persist dockstate in XML format or Binary and you could load at any time you want. Refer this KB article for How to add functionality to an application that will allow users to save and restore several dock states?. Please let me know if you have any questions. Thanks for your interesting in Syncfusion Products. Regards, Vijay >Sorry Vijay, > >Another problem: the above example doesn''t persist the state correctly when I set PersistState = true. > >How do I get persistence to work with this sample? > >Akash

Administrator [Syncfusion]
Replied On September 21, 2005 10:16 AM UTC

Vijay, In the attached sample, I programmatically set up the docking (in InitializeDockingWindows) rather than using the NewDockStateEndLoad event. I''ve also added code to SaveDockState and LoadDockState. However, when I run this sample for a second time (to get the saved state loaded), the panels all hide to the left again. Can this sample be modified to retain the docking information? Regards Akash

Vijayanand S [Syncfusion]
Replied On September 21, 2005 10:40 AM UTC

Hi Akash, I could not found any attachment in your post. Please attach the sample again. Thanks, Vijay

Administrator [Syncfusion]
Replied On September 22, 2005 08:15 AM UTC


Vijayanand S [Syncfusion]
Replied On September 22, 2005 04:19 PM UTC

Hi Akash, We regret for inconvenience caused. I am afraid, It is not possible to acheive the layout which you have asked while DockToFill Mode is in true state. I have once again notified the development team about this DockToFill mode bug and we will try our very best to address the same at the earliest. Currently there is no workaround for this problem. We appreciate your patience and cooperation. Thanks, Vijay.

Administrator [Syncfusion]
Replied On September 23, 2005 08:23 AM UTC

Vijay, Would it be possible for me to write my own SaveDockState and LoadDockState methods to acheive what I require? Are all the docking properties of the docked controls accessible to me? Akash

CONFIRMATION

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.

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

;