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

Setting width of docks

3 Answers 139 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Veljko Janjic
Top achievements
Rank 1
Veljko Janjic asked on 19 Mar 2007, 10:50 AM
How to set width of a dock element?

I am creating docks manually.

I tried using Width, PreferredDockSize , PreferredFloatSize, and it didn't work. Docks are always created and their size is set to the half of the space of their host.

3 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 21 Mar 2007, 08:08 AM
Hello Veljko,

To change the size of a DockPanel or any other IDockable implementation your should use the Size property. In the latest release the PreferredDockSize, PreferredFloatSize properties have new run-time  improvements.

For more info, please refer to this kb article:http://www.telerik.com/support/kb/article/b454K-thg-b454T-a.aspx

Greetings,
Julian Benkov
the telerik team
0
Veljko Janjic
Top achievements
Rank 1
answered on 21 Mar 2007, 08:37 AM
I solved it. The problem was it was all been set up in constructor, when I moved it to form_load event it all worked just fine.

What is a cause of this?
The docks flicker on load because they change size. Can this be avoided?

Thanks in advance.
0
Julian Benkov
Telerik team
answered on 21 Mar 2007, 02:50 PM
Hi Veljko,

This problem can be solved by using the DockingManager's SupendLayout / ResumeLayout methods before and after setting the size of the dock panel.
e.g.

dockingManager1.SuspenLayout(); 
dockPanel1.Size = new Size(100,200); 
dockingManager.ResumeLayout(); 

I hope this information helps.

Greetings,
Julian Benkov
the telerik team
Tags
Dock
Asked by
Veljko Janjic
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Veljko Janjic
Top achievements
Rank 1
Share this question
or