Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Default layout
posted

I've got a set of various windows that are being used in the dock manager. How do I set a default layout so that the first time it is opened up, the user has a basic set of windows in front of them. I want to start with three panes, one that takes up the left 2/3 of the screen. The second pane uses the top half of the remaining 1/3, and the third pane uses the bottom half. Anyone have any ideas?

I'll answer any questions you have if I'm not explaining this correctly.

  • 20872
    Suggested Answer
    Offline posted

    Hello,

    Followed your scenario I was able to create a layout that you need.

    First I am creating three DockAreaPane like:

    DockAreaPane dockAreaTopLeft = new DockAreaPane(DockedLocation.DockedLeft); 

    DockAreaPane dockAreaTopRight = new DockAreaPane(DockedLocation.DockedRight); 

    DockAreaPane dockAreaBottom = new DockAreaPane(DockedLocation.DockedBottom);

    Then you need to set the appropriate size of each area according your sceanrio like:

    dockAreaBottom.Size = new Size(this.Width, this.Height/2);

    dockAreaTopRight.Size = new Size(this.Width/3, this.Height/2); 

    dockAreaTopLeft.Size = new Size(this.Width*2/3, this.Height/2);

    Create some DockableControlPanes and add then to the DockAreaPanes.

    And add your DockAreaPanes to your dock manager like:

    manager.DockAreas.AddRange(new DockAreaPane[] {dockAreaBottom, dockAreaTopRight, dockAreaTopLeft } );

    Please let me know if this is not what you are looking for.

    Sincerely,

    Danko Valkov

    Developer Support Engineer

    Infragistics, Inc.