Resize of the toolwindow for the floated state.

Docking/MDI for WPF Forum

Posted 12 years ago by keshav bansal
Version: 11.2.0554
Avatar

Hi,

How to set the Resizable behavior for the toolWindow to be false when it is in the floated state.

for example:When a user floated the toolwindow from the docking state,it should not be resizable by the user.

Means its height and width should be fixed when it is in floated state.

Comments (5)

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

Hi Keshav,

We do not currently support fixed sized windows. You could probably use Window.GetWindow(...) to get the associated rafting window and set it's ResizeMode to NoResize.


Actipro Software Support

Posted 12 years ago by keshav bansal
Avatar

Hi,

I am able to set the Height and width of the toolWindow using the Window.GetWindow(...) but not able to set the ResizeMode to NoResize using the Window.GetWindow(...).

Code used :

void dockSite_WindowStateChanged(object sender, DockingWindowStateChangedEventArgse)

{

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

if (state == "Floating"){

Window window = Window.GetWindow(toolWindow);

window.Height = 70;

window.Width = 150;

window.ResizeMode=ResizeMode.NoResize.    // Not Working

toolWindow.HasTitleBar =true;

toolWindow.CanMaximize =false;

toolWindow.CanClose =true;

}

}

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

Hi Keshav,

I understand better what the problem is now.  RaftingWindow already has ResizeMode set to NoResize.  We do this because if we have it set to resizable, then we get the glass outer border on the rafting window, and we want it fully themed instead.  So thus we set it to NoResize by default.

That being said, we use a docking:WindowControl in the RaftingWindow template to render its title/borders, etc.  Since the RaftingWindow.ResizeMode is set to NoResize, we don't bind the ResizeMode of the RaftingWindow to the docking:WindowControl.  And that's why that setting has no effect.  Keep in mind that we don't normally allow non-resizable rafting windows, so this hasn't really been a problem for others. 

To workaround the issue, if you clone the RaftingWindow style in your App.Resources and make a new Style that sets the ResizeMode on the docking:WindowControl, then it will fix that problem for you.


Actipro Software Support

Posted 12 years ago by keshav bansal
Avatar

Hi,

I am not able to apply these styles so please give me these style RaftingWindow style  and a new Style that sets the ResizeMode on the docking:WindowControl.

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

Hi Keshav,

We don't have such a sample at this time. If you purchased WPF Studio, you can download the default Styles from our website under My Account > Organization Purchases. If you purchased WPF Essentials or individual products, then you can email our support address to request the default Styles for your licensed products.


Actipro Software Support

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.