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.

Set diagram height to 100% of browser window

Thread ID:

Created:

Updated:

Platform:

Replies:

126207 Sep 30,2016 02:48 PM Oct 5,2016 12:00 AM ASP.NET MVC 3
loading
Tags: Diagram
Tom Frajer
Asked On September 30, 2016 02:48 PM

Hi, I would like to create diagram canvas that will fill browser window completely. I have problem to set it to 100% height - is it possible to achieve this?

Shyam G [Syncfusion]
Replied On October 4, 2016 06:31 AM

Hi Tom, 
 
We can set the diagram models height in percentage. Also if you set the model’s height in percentage, then the diagram’s height will be set based on the parent elements height.  We have created a sample in which we have set the parent’s element(body,html) height in percentage using CSS. Please refer to the code example and sample below. 
 
Code example: 
 
DiagramProperties model = new DiagramProperties(); 
 model.Height = "100%"; 
 model.Width = "100%"; 
 
<style> 
    html, body { 
       height:100%; 
    } 
</style> 
 
 
Regards, 
Shyam G 


Tom Frajer
Replied On October 4, 2016 07:32 AM

Great, now it works. I needed to set my html and body to 100% too.

Shyam G [Syncfusion]
Replied On October 5, 2016 12:00 AM

Hi Tom, 

Please let us know if you need further assistance on this. 

Regards, 
Shyam G 


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.

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.

;