Programatically set the height and width of the toolwindow in application build using the PrismInteg

Docking/MDI for WPF Forum

Posted 12 years ago by keshav bansal
Version: 12.1.0562
Avatar

Hi,

How to Programatically set the height and width of the toolwindow in application build using the prismItegration with the docking.

For Example:I have two docksite named docksite1 and the docksite2 in  my main application  and each having the toolwindow named toolwindow1 and toolwindow2 respectively using the PrismIntegartion with the docking.That mean my usercontrol1 is hosted as the toolwindow1 in docksite1 of my main application and the usercontrol2 is hosted as the toolwindow2 in docksite2 of  my main application.Suppose the width of the usercontrol1 is 200 that mean the width of the toolwindow1 is also 200 and if i click on the AutoHide button of the toolwindow1 then its form the Tab of the toolwindow1 but when i hover the mouse over the tab of the toolwindow1 then its shows the toolwindow1 as the pop but of width appx.150 that is less than the 200. I think this 50 pixel  width is used for the Tab of the toolwindow1.But when i hover the mouse over the tab then  i want to display the toolwindow1 as the pop of the same width(ie 200) as it was hosted as the toolwindow1 in the docksite1. 

[Modified 12 years ago]

Comments (5)

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

Hi Keshav,

You may be able to set the attached DockSite.ControlSize property on the tool window to control the size.


Actipro Software Support

Posted 12 years ago by keshav bansal
Avatar

Hi,

I am handling the SizeChanged event of the View (Usercontrol1) which is hosted as the toolwindow1 so as i click on the Pin of the title of the toolwindow1(having usercontrol1) my sizeChanged event will be fired and in  Handler for that size change event , i am using the belowed code.While hovering the mouse on the Tab formed (on clicking the AutoHide Button), sizechange Handler will be called and my code that is

DockSite.SetControlSize(toolWindow, newSize(250, 650));

executes but its not setting the above size but when i  Again hover the mouse on the Same Tab then also my above  code executes and Dispays the Toolwindow according to above size ie. of 250 width and 650 height. 

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

Hi Keshav,

You are probably setting the control size too late in that case.  It needs to be set before the mouse interaction.  That's why it doesn't take effect the first time.


Actipro Software Support

Posted 12 years ago by keshav bansal
Avatar

Hi,

If i am setting the control size too late in that case,So When to set the so that it invokes before mouse interaction and my code executes and dispaly the view at first time when i hover the mouse over the tab formed for the view.

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

You would need to set the size probably back when the tool window first enters that state.  Perhaps in a DockSite.WindowStateChanged handler.


Actipro Software Support

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.