Question

Moving the Toolwindow without dragging the titleBar

Posted 3 years ago by Avatar keshav bansal

Hi,

Inittially i am setting the HasTitleBar property to false.Toolwindow displayed in main application using PrismIntegration has no titlebar. 

I am able to drag and move the ToolWindow without dragging the titlebar.

As  i write the command bahaviour for MouseDown event for the toolwindow and that is bindee to a command and command handler for that commad is

privatevoid MouseDown(objectparam)

{

toolWindow.DragMove();

}

Docksite for the above toolwindow have the window state changed event.

dockSite.WindowStateChanged +=newEventHandler<DockingWindowStateChangedEventArgs>(dockSite_WindowStateChanged);

when i drag the toolwindow from the docked state to floated state , i am setting the HasTitleBar to false and height and width of the toolwindow.But i am not getti ting the same height and width but showing toolwindow with the titlebar. 

As i dragged the toolwindow and floated its height and width should be same as ita was in the docking state.But when i drag the toolwindow and floated that toolwindow its height and width are different.

void dockSite_WindowStateChanged(object sender, DockingWindowStateChangedEventArgse)

{

stringstate = (e.Window.State).ToString();

if (state == "Floating"){

toolWindow.HasTitleBar =true;

toolWindow.Height=100;

toolWindow.Width=600;

}

else

{

toolWindow.HasTitleBar =

false;}

}


Comments (1)

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

Hi Keshav,

You cannot set the Width/Height properties on the ToolWindow. The ToolWindow is only responsible for rendering it's associated tab, it does not render it's content. So your code above is basically saying you want the tab to be 600x100.

You may be able to use Window.GetWindow(toolWindow) to get the associated rafting window and then set it's Width/Height and resize properties. But you will probably have to dispatch that code, so it occurs after the WindowStateChanged event is raised.


Actipro Software Support
Information The latest build of this product (2014.2 build 0610) was released 2 months ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.