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. Image for the cookie policy date
close icon

DocumenContainer MDI Size and Position after adding

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



3 Replies

BA Berkunath A Syncfusion Team 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


MP Michael Phillips 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.


MS Mariappan S Syncfusion Team 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.


Loader.
Live Chat Icon For mobile
Up arrow icon