PrismIntegration in docking

Docking/MDI for WPF Forum

Posted 7 years ago by keshav bansal
Version: 11.2.0552
Avatar

Hi,

How to register the views with in the same docksite but at the different position (Like use of SplitContainer in simple docking application) with the help of the PrismIntegration in docking ?

 

As i had solvd it with the simple docking sample with in the single Xaml like below specified sample.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

<Grid><!--<DockPanel LastChildFill="True">--><!--<docking:SplitContainer Orientation="Vertical">--><docking:DockSite x:Name="BaseSite"CanDocumentWindowsRaft="True" CanToolWindowsAttach="False"><!--<docking:SplitContainer Orientation="Vertical" ><docking:SplitContainer>-->

<Grid><Grid.RowDefinitions><RowDefinition /><RowDefinition Height="70"/></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition/></Grid.ColumnDefinitions><docking:DockSite x:Name="DockSite1" Grid.Row="0" Grid.ColumnSpan="2"><docking:SplitContainer Orientation="Vertical"><docking:SplitContainer><docking:ToolWindowContainer><docking:ToolWindow><Button Name="aview" Content="Ablation View" Background="Red"></Button><!--//<Common:AblationView x:Name="win1" Title="AblationView" />--></docking:ToolWindow></docking:ToolWindowContainer><!--</docking:DockSite><docking:DockSite x:Name="DockSite2" Grid.Row="0" Grid.Column="1">-->

<docking:ToolWindowContainer><!--<docking:ToolWindow>--><Common:VitalsView x:Name="win2"Title="VitalsView" /><!--</docking:ToolWindow>--></docking:ToolWindowContainer></docking:SplitContainer><!--<docking:ToolWindowContainer><Common:StatusView x:Name="win3" Title="StatusView" />

</docking:ToolWindowContainer>-->

<!--</docking:SplitContainer>--><!--</docking:DockSite><docking:DockSite x:Name="dockSite2" Grid.Row="2" Grid.ColumnSpan="2" CanDocumentWindowsRaft="True">

<docking:SplitContainer>-->

<!--<docking:ToolWindowContainer><Common:AblationView x:Name="win1" Title="AblationView" />

</docking:ToolWindowContainer>

<docking:ToolWindowContainer>

<Common:VitalsView x:Name="win2" Title="VitalsView" />

</docking:ToolWindowContainer>-->

<!--</docking:SplitContainer>--><!--<docking:ToolWindowContainer>

</docking:ToolWindowContainer>-->

<docking:WorkspaceHeight="Auto"><Button Height="30" Width="100" Name="vbutoton" Background="Red">Waveform View</Button></docking:Workspace></docking:SplitContainer></docking:DockSite><docking:DockSite x:Name="DockSite3" Grid.Row="2" Grid.ColumnSpan="2"><docking:ToolWindowContainer><Common:StatusView x:Name="win31" CanDockLeft="False" CanDockRight="False"CanAttach="False"Title="StatusView" /></docking:ToolWindowContainer></docking:DockSite><!--</docking:SplitContainer>--></

Grid></docking:DockSite><!--<docking:DockSite CanDocumentWindowsRaft="True"><docking:ToolWindowContainer Height="Auto">

<Common:sample x:Name="win4" Title="SampleView" />

</docking:ToolWindowContainer>

</docking:DockSite>

</docking:SplitContainer>

</DockPanel>-->

</Grid>

-----------------------------------------------------------------------------------------------------------------------------

Means How to use the SplitContainer in the PrismIntegration of Docking that will split the two views(Which acts as the docking windows) with in the same docksite.

Comments (8)

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

Hi Keshav,

When using Prism you do not specify the ToolWindows or their content directly in the DockSite. The DockSite is bound to a list of view models (using DocumentItemsSource and/or ToolItemsSource), which are then wrapped in dynamically created instances of DocumentWindow or ToolWindow. You must then programmatically open these windows, as seen in our Prism sample applicaiton. There are several methods for opening (Open) and floating (Float) windows.

[Modified 7 years ago]


Actipro Software Support

Posted 7 years ago by keshav bansal
Avatar

Hi,

Ok..

How to use the PrismIntegration with docking concept  if  i want to fix(Initially sets the position of the toolwindows that are dockable)  the positions of the tool windows inside the docksite.

For Example :Consider i have three tool windows and as the application run , these toolwindows should be registerd or displayed in the docksite which  is done with the help of prismintegration but the problem is of the position of the toolwindows inside the docksite.These two toolwindows should  displayed on the top of the Application  that covers the first half or some portion of the docksite and the third toolwindow should displayed in the rest portion of the docksite.

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

Hi Keshav,

Our Prism sample application shows how to dock two ToolWindows to the right side, with a tabbed MDI area filling the remaining space. You can see in the Open method of the SolutionExplorerToolItemViewModel class where it performs this. You would simply change the Direction to Top to have that ToolWindow docked to the top area.

If you want to open a ToolWindow in the MDI area then you can call MoveToMdi instead of Dock (as seen in SolutionExplorerToolItemViewModel's Open method).

If you do not want a MDI area, but instead want to have an application that is made up entirely of ToolWindows then that is what we call "inner fill" mode. You would need to remove the Workspace/TabbedMdiHost from the DockSite. Then you can open ToolWindows relative to each other, or relative to the DockSite (i.e. Top/Bottom/Left/Right).


Actipro Software Support

Posted 6 years ago by Peter
Avatar

Hi, I'm just starting ActiPro Dock. There is commercial talk of documentation but can't find it. Your Support - Knowledge Base is nothing but 8 pages long.

So refering to WPF version: just how do you float a document window by API, and dock it again ?

In the Prism Integration Sample, the Float option for the doc windows are grayed out. 

[Modified 6 years ago]

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

Hi Peter,

Thanks for evaluating our products.

The online KB is not intended to be product documentation.  The documentation we mention comes with the product, even in the the evaluation version.  It ges installed to the Windows Programs menu group for the WPF controls (a link to it is there).  The "Lifecycle and Docking Management" topic in it talks about programmatic floating/docking.  One you have a reference to the docking window for your view model, you can use methods described there to interact with it.

I belive the DockSite.CanDocumentWindowsRaft property defaults to false.  If you set it to true in the Shell.xaml file, you will be able to float it at run-time.


Actipro Software Support

Posted 6 years ago by Peter
Avatar

Thank you for the hint. I assigned docksite.CanDocumentWindowsRaft in the Initialize method of DocumentItemViewModel class to make it available to all my documents. 

Posted 6 years ago by Alan McCormick
Avatar

Where is this Prism Integration Sample you speak of? I have the source and been working with docking/prism for a while and I haven't seen it

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

Hi Alan,

The Prism Integration Sample projects come with the WPF controls install.  Once you install with default options, you should have links to the projects from your Window's Programs menu group for the Actipro WPF Controls.

Note that if you are running Windows 8, you can show "All apps" in the Start screen and navigate to the "Actipro WPF Controls" group to find links to them.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) 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.