This is a migrated thread and some comments may be shown as answers.
Is it possible to dock panel to the right?
5 Answers 64 Views
This is a migrated thread and some comments may be shown as answers.
Jill-Connie Lorentsen
Top achievements
Rank 1
Jill-Connie Lorentsen asked on 16 Mar 2009, 12:34 PM
I have a tabbed document + two dock panels, one docked to the left and one autohidden to the right.

When the autohidden panel opens it is displayed nicely to the right, but when I press the pin it moves to the left. I would like it to stay on the right, but I haven't found a way to do so, so I hope someone can enlighten me 

5 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 16 Mar 2009, 06:50 PM
Jill,
     I attempted to recreate your issue without success.  I setup a new project with a dockpanel on the left, a tabbed document and a dockpanel autohidden to the right.  When I pin the dockpanel it docks to the right as expected.  I am using the Q1 2009 release for my test, which release are you working with?  It might help to see the Layout information from my test and compare it to your layout information.  I obtained this by adding the following code to my project.
private void Form1_Load(object sender, EventArgs e)  
{  
    dockingManager1.SaveXML("C:\\docking.xml");  

The file output looked like this.
<?xml version="1.0" encoding="utf-8" ?>   
 <DockingTree xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">  
 <Sites Type="Telerik.WinControls.Docking.AutoHideContent" Assembly="Telerik.WinControls.Docking, Version=2009.1.9.311, Culture=neutral, PublicKeyToken=5bb2a467cbec794e">  
 <Sites Orientation="Horizontal" Size="259;264" HidePosition="0">  
  <Dockables />   
 <Left Orientation="Horizontal" Size="259;264" HidePosition="0">  
  <Dockables />   
 <Left Orientation="Horizontal" Size="94;264" HidePosition="Left">  
 <Dockables> 
  <XmlDockable Text="DockPanel1" DockState="Docked" DockPosition="Left" PreferredDockSize="100;200" PreferredFloatSize="150;300" Guid="0118791d-aa4e-48aa-8a55-d0f7d411b800" Type="Telerik.WinControls.Docking.DockPanel" Assembly="Telerik.WinControls.Docking, Version=2009.1.9.311, Culture=neutral, PublicKeyToken=5bb2a467cbec794e" CaptionVisible="True" TabStripVisible="True" CloseButtonVisible="True" HideButtonVisible="True" DropDownButtonVisible="True" />   
  </Dockables> 
  </Left> 
 <Rigth Orientation="Horizontal" Size="161;264" HidePosition="0">  
 <Dockables> 
  <XmlDockable Text="Document1" DockState="TabbedDocument" DockPosition="Fill" PreferredDockSize="100;200" PreferredFloatSize="150;300" Guid="6e206cd1-5fec-4ed5-abd6-156163a0ef18" Type="Telerik.WinControls.Docking.DocumentPane" Assembly="Telerik.WinControls.Docking, Version=2009.1.9.311, Culture=neutral, PublicKeyToken=5bb2a467cbec794e" CaptionVisible="True" TabStripVisible="True" CloseButtonVisible="True" HideButtonVisible="True" DropDownButtonVisible="True" />   
  </Dockables> 
  </Rigth> 
  </Left> 
 <Rigth Orientation="Horizontal" Size="305;513" HidePosition="Right">  
 <Dockables> 
  <XmlDockable Text="DockPanel2" DockState="AutoHide" DockPosition="Right" PreferredDockSize="100;200" PreferredFloatSize="150;300" Guid="40f4d1cb-3c2e-4214-ae6c-caca0376a55a" Type="Telerik.WinControls.Docking.DockPanel" Assembly="Telerik.WinControls.Docking, Version=2009.1.9.311, Culture=neutral, PublicKeyToken=5bb2a467cbec794e" CaptionVisible="True" TabStripVisible="True" CloseButtonVisible="True" HideButtonVisible="True" DropDownButtonVisible="True" />   
  </Dockables> 
  </Rigth> 
  </Sites> 
  </Sites> 
  </DockingTree> 

Does your layout look like this or is it different?
0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 17 Mar 2009, 01:40 PM
Thanks for your time!

My layout looks the same, but I use 2008 Q3 version. I've downloaded the newest version, but it didn't help.

Regards, Jill-Connie
0
Julian Benkov
Telerik team
answered on 18 Mar 2009, 12:38 PM
Hello Jill-Connie Lorentsen,

To support this scenario, first dock the panel to the right without hosting the DockPanel and then set it to autohide mode.

dockingManager1.SetDock(dockPanel1, DockPosition.Right); 
dockPanel1.DockState = DockState.AutoHide; 
 
The xml serialized file must be changed:

<Left Orientation="Horizontal" Size="94;264" HidePosition="Right">   

I hope this helps. Do not hesitate to write me back if you have further questions.

Sincerely yours,
Julian Benkov
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 19 Mar 2009, 02:06 PM
Well...

I now have two equal dock panels to the right, after adding the code you suggested to my formload event handler.

The dock panels do dock to the right, but there is some weird behaviour. As I dock to the right, my panel to the left gets narrower, and grows back to its original size when I undock the panel to the right.

Also, when I just open the panel to the right it has a width, - this width increases when I dock it.

Has anybody experienced the same? And maybe has a solution?


Regards, Jill-Connie Lorentsen
0
Julian Benkov
Telerik team
answered on 23 Mar 2009, 12:06 PM
Hello Jill-Connie Lorentsen,

You can change your logic and dock panels in this way:

dockingManager1.SetDock(dockPanel1, DockPosition.Right);  
dockingManager1.SetDock(dockPanel2, dockPanel1, DockPosition.Left);  
dockPanel1.DockState = DockState.AutoHide;  

In this scenario, first dock the right panel and then attach the left panel to them. Do not hesitate to write me back if you have further questions.

All the best,
Julian Benkov
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Dock
Asked by
Jill-Connie Lorentsen
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Jill-Connie Lorentsen
Top achievements
Rank 1
Julian Benkov
Telerik team
Share this question
or