WPF Rhino Plugin, force window dimensions to be unchangable

Hi all,

I have tested a Rhino Plug-in that implements a WPF user control.
In my MainView.xaml, I have specified the window dimensions (600 x 1080) as follows:

Again in my RhinoPlugInDocPanel.xaml:

However, after loading the plugin, the actual window size displayed in Rhino is always according to the window size that was last opened in Rhino (so if the user drags the window / makes it bigger, smaller, the window size is according to past user “drags”, not according to the dimensions set in the xaml).

How can I force the window to have the dimensions in the xaml only (user cannot change), and how can I specify that on first load the dimensions in the xaml are used for the window size?

Thanks a lot for your hints and tips!

you can prevent the window from changing size by setting max and min values for the height and width in your xaml

Height="600" Width="1080" MinHeight="600" MinWidth="1080" MaxHeight="600" MaxWidth="1080">
1 Like

Hi Richard, thanks for your suggestion.
I tried this and the Rhino window size dimensions is still “changeable”.
I suspect freezing the window size is a property of the Rhino.UI.Panels class or similar?

i must have misunderstood, i dont believe there is any ability to control the rhino window itself. your wpf xaml files only define behavior for the windows your code generates

Like others have said, since you are creating a UserControl and not a Window, you have no way to dictate your “parent windows” size. If you want complete control you should have your plugin create it’s own Window.