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

Re-sizing an element (document) in a document container programatically

I have an application in which the Main Window ('ECMOSimulator') is a DocumentContainer component.

It is populated with elements  - all of which are 'UserControls' (eg 'ECMOSystem').

How do I instantiate such an element programmatically and then set it's size?           

The snippet below opens the element in the container, but does not set the Height and Width.

ECMOSystem ecmoDevice = new ECMOSystem();

ecmoDevice.Height = 400;

ecmoDevice.Width = 800;

ECMOSimulator.Items.Add(ecmoDevice);


Andy Pybus


3 Replies

SM Subashini Mahendran Syncfusion Team April 3, 2017 12:16 PM UTC

Hi Andy Pybus,

Thank you for contacting Syncfusion support.

We have checked your query "Re-sizing an element (document) in a document container programatically". By using SetSizetoContentInMDI method we can resize the document in DocumentContainer programmatically. We have prepared the sample to meet your requirement. Please download the same from the below location.

Sample: DocumentContainer_129750  
  
If we misunderstood your reqiurement, please provide more information regarding the requirement. This would help us to proceed further.

Regards,
Subashini M.  



AP Andy Pybus April 4, 2017 06:42 PM UTC

Thank you.

Perfect.



SM Subashini Mahendran Syncfusion Team April 5, 2017 06:34 AM UTC

Hi Andy Pybus,

We are glad to know that your issue has been solved. Please let us know if you need any further assistance.

Regards,
Subashini M.

Loader.
Live Chat Icon For mobile
Up arrow icon