Differnce b/w Programatically moving the toolwindow to Docksite and Mannually Drag and Move to Base.

Docking/MDI for WPF Forum

Posted 6 years ago by keshav bansal
Version: 12.2.0573
Avatar

Hi,

What is the Differnce b/w Programatically moving the toolwindow to Docksite and Mannually Drag and Move to Base ?

Programatically docking to BaseDocksite and resizing it not calling the SizeChange of the View in that toolwindow......

Sample application-----

<Docking:Docksite x:Name="BaseDocksite">

<Docking:Workspace>

<Grid.RowDefinitions>

<RowDefinition Height="Auto"/>

<RowDefinition Height="*"/>

</Grid.RowDefinitions>

<Docking:Docksite x:Name="Docksite1" Grid.Row="0">

</Docking:Doxcksite>

<Docking:Docksite x:Name="Docksite2 Grid.Row="1">

</Docking:Doxcksite>

</Docking:Workspace>

</Docking:Docksite>

I have two usercontrols named UserControl1 and UserControl2.

I am loading the these Usercontrols as the Toolwindow using the PrismIntegration with Docking.

with the help  this.regionManager.Regions[Constants.Docksite1].Add(Docksite1ViewModel);

Scenario1--->

This view model consists of Initialize and   Open mathod of Docking Window Interface.

In Open Method i use like toolwindow.Dock(Docksite1.Direction.Left);

Same for Usercontrol2.

As i run the application Usercontrol1 and Usercontrol2 are displayed as the Toolwindow .

As Docksite1 and Docksite2 are linked with the BaseDocksite.

i Drags the Usercontrol1Toolwindow to BaseDocksite and i resize the UserControl1Toolwindow then its also resizing the Content of UserControl1.

 

Scenario2--->

This view model consists of Initialize and Open mathod of Docking Window Interface.

As Docksite1 and Docksite2 are linked with the BaseDocksite.

In Open Method i use like toolwindow.Dock(BaseDocksite.Direction.Left);

Same for Usercontrol2.

As i run the application Usercontrol1 and Usercontrol2 are displayed as the Toolwindow .

I resize the UserControl1Toolwindow then its Resizing  is not calling the resizing of UserControl1.

 

I need to implement the Scenario2(Programatically docking the toolwindow to the BaseDocksite) but its not resizing the Content of the View.

So for that What should i do....?

 

 

Comments (1)

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

Hi Keshav,

The same core docking code gets executed regardless of whether you programmatically dock, or drag and dock a tool window.

All tool window content is presented in a ContentPresenter and it will tell the content to fill within it.  The only time we've ever seen that not work correctly is if you would set some layout properties on the content UserControl like Width, Height, HorizontalAlignment, VerticalAlignment, etc.  My guess is that you have something like that in the one scenario.

If you look and don't think so then please make a new simple sample project that shows the issue and email that to our support address and we'll take a look.


Actipro Software Support

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.