How to set initial size of DocumentWindow programmatically?

Docking/MDI for WPF Forum

Posted 13 years ago by Janene McCrillis - UI Software Engineer, Wireless Seismic
Version: 11.1.0542
Avatar
I have DocumentWindows created by my program that get placed into a docksite after creation, which do with this constructor:


public DocumentWindow(ActiproSoftware.Windows.Controls.Docking.DockSite dockSite, 
string name, string title, System.Windows.Media.ImageSource imageSource, object content)

I want to save/restore the user's selected size for the DocumentWindows when they open new documents. How do I do this? I've tried by: resizing the content UserControl; using dockSite.DefaultControlSize; using StandardMdiHeight... none of this works.

Thanks in advance,

Janene Pappas-McCrillis
Wireless Seismic

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Janene,

You would need to set the DockSite.ControlSize attached property (i.e. DockSite.SetControlSize(window, new Size(x,y))) on your window. Keep in mind that this only sets the desired default size. If you load a DocumentWindow into a tabbed MDI host, then it will size to fit the host.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.