We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DocumenContainer MDI Size and Position after adding

Thread ID:

Created:

Updated:

Platform:

Replies:

117341 Sep 30,2014 06:05 PM UTC Oct 8,2014 01:24 PM UTC WPF 3
loading
Tags: DockingManager
Michael Phillips
Asked On September 30, 2014 06:05 PM UTC

I am having problems being able to control the size of a new item as well as keeping the default start position.
By just calling:
documentContainer.Items.Add(newItem);
the new item is positioned correctly, but the size is very small.

Calling:
DocumentContainer.SetMDIBounds(newItem, new Rect(0, 0, documentContainer.ActualWidth * .75, documentContainer.ActualHeight * .75));
first gives me a nice size, but does always places it at 0,0.

Can I find the next start position and put it in the Rect or is there a better way?

Michael



Berkunath A [Syncfusion]
Replied On October 3, 2014 04:21 AM UTC

Hi Michael,

 

Thank you for contacting Syncfusion support.

 

You can place the MDI Document by set the MDIBounds to DocumentContainer child. The document start position is based on the given rectangle position. In your sample you have set the Document start position as point (0,0) . We have prepared the sample that tries to meet your requirement. You can download the sample from attachment.

 

Please have a look at the sample and let us know if it helps you.

 

Regards,

Berkunath A

 


Attachment: MdiDocumentPosition_12e63e85.zip

Michael Phillips
Replied On October 3, 2014 02:02 PM UTC

What I was hoping for was that the MDI mode actually worked like the Windows MDI client and the start position of the next window was determined internally and not something the developer had to impose programmatically. So I guess from your example the answer is no and I have to do the work myself.

Mariappan S [Syncfusion]
Replied On October 8, 2014 01:24 PM UTC

Hi Michael,

 

Thank you for your update.

 

Once we have set MDIBounds we need to done calculations for positioning the MDIWindow.

 

Please let us know if you need futher assistance.

 

Regards,

Mariappan S.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;