Setting width of docks

4 posts, 0 answers
  1. Veljko Janjic
    Veljko Janjic avatar
    20 posts
    Member since:
    Nov 2005

    Posted 19 Mar 2007 Link to this post

    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.
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 21 Mar 2007 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Veljko Janjic
    Veljko Janjic avatar
    20 posts
    Member since:
    Nov 2005

    Posted 21 Mar 2007 Link to this post

    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.
  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 21 Mar 2007 Link to this post

    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
Back to Top