DocumentWindow Size (TabbedMdiHost?)

Docking/MDI for WPF Forum

Posted 7 years ago by Joe Angry
Version: 11.1.0545
Avatar
I'm trying to setup my programs default view like this.

However, when I start my program all my windows look like this.


I'm creating my four windows programmatically, and calling MoveToNewVerticalContainer(); and MoveToNewHorizontalContainer() to get the four views (I couldn't figure out a way to do this in XAML, which would be the most ideal way really).
DocumentWindow documentWindow1 = this.CreateViewportWindow("Upper-Left", g1);
documentWindow1.Activate();

DocumentWindow documentWindow2 = this.CreateViewportWindow("Upper-Right", g2);
documentWindow2.Activate();
documentWindow2.MoveToNewVerticalContainer();

DocumentWindow documentWindow3 = this.CreateViewportWindow("Lower-Left", g3);
documentWindow3.Activate();
documentWindow3.MoveToNewHorizontalContainer();

DocumentWindow documentWindow4 = this.CreateViewportWindow("Lower-Righto", g4);
documentWindow4.Activate();
documentWindow4.MoveToNewHorizontalContainer();
documentWindow4.MoveToNewVerticalContainer();
I've tried several different ways but I haven't been able to change the sizes in anyway.
Any pointers in the right direction would be great! I've tried searching the forums, but haven't been able to find anything helpful.

If there's a way of doing this in the XAML that'd work too!

Comments (2)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Joe,

You should be able to do something like the following in your Workspace:
<docking:DockSite ...>
    <docking:Workspace ...>
        <docking:TabbedMdiHost ...>
            <docking:SplitContainer Orientation="Vertical">
                <docking:SplitContainer Orientation="Horizontal">
                    <docking:TabbedMdiContainer>
                        <docking:DocumentWindow Title="Upper-Left" ... />
                    </docking:TabbedMdiContainer>
                    <docking:TabbedMdiContainer>
                        <docking:DocumentWindow Title="Upper-Right" ... />
                    </docking:TabbedMdiContainer>
                </docking:SplitContainer>
                <docking:SplitContainer Orientation="Horizontal">
                    <docking:TabbedMdiContainer>
                        <docking:DocumentWindow Title="Lower-Left" ... />
                    </docking:TabbedMdiContainer>
                    <docking:TabbedMdiContainer>
                        <docking:DocumentWindow Title="Lower-Right" ... />
                    </docking:TabbedMdiContainer>
                </docking:SplitContainer>
            </docking:SplitContainer>
        </docking:TabbedMdiHost>
    </docking:Workspace>
</docking:DockSite>


Actipro Software Support

Posted 7 years ago by Joe Angry
Avatar
Works just perfect. Thanks!
The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.