Docking Inside MDI

Docking/MDI for WPF Forum

Posted 14 years ago by nash
Version: 10.1.0521
Avatar
Hi,
I have MDI window filled with user controls. My requirement is drag one control out side
the MDI window. If user drag this control, the MDI window should resize automatically.
Second step is, user can also dock that control in side MDI. If user drag the control on MDI and Drop it. It should dock according to the position.
To fulfill this requirement, I was searching for the docking inside the MDI.
Does Actipro provides this kind of functionality in MDI?
If I want to work around what should be suggestion?

Is it really a feasible idea to dock a control in side the MDI ?
If any question please ask me for more details. I can explain it in dept.
Any suggestions appreciated.
Thanks,
N

Comments (7)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

We do support floating and docking windows into a TabbedMdiHost, but not the StandardMdiHost. To enable this feature for tabbed MDI, you would need to set DockSite.CanDocumentWindowsRaft to true.

It is technically possible to float/dock from the StandardMdiHost, but that has not been implemented yet. If that's what you are referring to, I can add this forum post to the TODO item so you will be notified when support is added.


Actipro Software Support

Posted 14 years ago by nash
Avatar
I am trying to put ToolWindow inside the DocumentWindow. The problem is it is not working what I need. I want docking on the left side of DocumentWindow so when User click on that it should show tool window. This is sample code the ToolWindow is inside grid and even Toolwidow is auto hide mode, still grid column still shows blank place that i don't want. If You put columns as auto, it is not displaying anything even on clicking on Toolwindow. I don't know how to upload picture here, i have pic what behavior i exactly want.
 <docking:Workspace>
                <docking:StandardMdiHost>
                    <docking:DocumentWindow Title="Document1.txt" Description="Text document" 
                        
                                            FileName="Document1.rtf" x:Name="m_DockingWindow" CanClose="True" CanRaft="True">
                        <!--<StackPanel Orientation="Horizontal">-->
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <docking:DockSite Grid.Column="0" >
                            <docking:ToolWindowContainer>
                                <docking:ToolWindow Title="Tool Window 11" CanDockRight="True"  >
    
                                </docking:ToolWindow>
                                
                            </docking:ToolWindowContainer>
                            
                        </docking:DockSite>
                            <local:EmployeeInfoCtrl Grid.Column="1"/>
                        </Grid>
                        <!--</StackPanel>-->
                    </docking:DocumentWindow>
                    <docking:ToolWindow x:Name="m_ToolWindow4" Title="Tool Window 4" />
                </docking:StandardMdiHost>
            </docking:Workspace>
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

The DockSite can't be "auto-sized" like in your code. The DockSite needs additional space to host the ToolWindow flyouts (when using hosted auto-hide windows). I'd recommend you include your EmployeeInfoCtrl inside the DockSite as custom content and have the DockSite fill the DocumentWindow. The Workspace Content QuickStart in our Sample Browser shows an example of how custom content can be added.


Actipro Software Support

Posted 14 years ago by nash
Avatar
Hi,
Thanks for suggestion. I tried that from Quick-start sample. It is working but it is missing minimize,maximize and close options on the right top.
Any other suggestion or trick that can help me out.
I need same functionality on Documentwindow as the quick start sample workspace but want the right top options also.
Thanks,
Naishadh
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Naishadh,

Sorry, but I don't understand the issue. Your code should look something like this:
<docking:DockSite>
    <docking:Workspace>
        <docking:StandardMdiHost>
        
            <!-- Each of these will show up as a Standard MDI child window with minimize/maximize/close buttons -->
            <docking:DocumentWindow ...>
            
                <!-- This nested DockSite will be inside the DocumentWindow, and have ToolWindow11 on the left -->
                <!-- and your control on the right -->
                <docking:DockSite>
                    <docking:Workspace>
                        <docking:SplitContainer Orientation="Horizontal">
                            <docking:ToolWindowContainer>
                                 <docking:ToolWindow Title="Tool Window 11" ...  />
                            </docking:ToolWindowContainer>
                            <local:EmployeeInfoCtrl />
                        </docking:SplitContainer>
                    </docking:Workspace>
                </docking:DockSite>
                
            </docking:DocumentWindow>
            
            <docking:ToolWindow Title="Tool Window 4" ... />
            
        </docking:StandardMdiHost>
    </docking:Workspace>
</docking:DockSite>
Keep in mind that ToolWindow11 cannot be docked into the outer DockSite (i.e. along side ToolWindow4). If you are looking to achieve something else, maybe send us a mock up screen shot to clarify.


Actipro Software Support

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Naishadh,

Based on your screenshot, I believe you want:
<docking:DockSite>
    <docking:Workspace>
        <docking:StandardMdiHost>
        
            <!-- Each of these will show up as a Standard MDI child window with minimize/maximize/close buttons -->
            <docking:DocumentWindow ...>
            
                <!-- This nested DockSite will be inside the DocumentWindow, and have ToolWindow11 on the left -->
                <!-- and your control on the right -->
                <docking:DockSite>
                    <docking:SplitContainer Orientation="Horizontal">
                        <docking:ToolWindowContainer>
                             <docking:ToolWindow Title="Tool Window 11" ...  />
                        </docking:ToolWindowContainer>
                        <docking:Workspace>
                            <local:EmployeeInfoCtrl />
                        </docking:Workspace>
                    </docking:SplitContainer>
                </docking:DockSite>
                
            </docking:DocumentWindow>
            
            <docking:ToolWindow Title="Tool Window 4" ... />
            
        </docking:StandardMdiHost>
    </docking:Workspace>
</docking:DockSite>


Actipro Software Support

Posted 14 years ago by nash
Avatar
Perfectly what I want.
Thanks,
Naishadh
The latest build of this product (v24.1.1) 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.