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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set diagram height to 100% of browser window

Thread ID:





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

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 10:31 AM UTC

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%"; 
    html, body { 
Shyam G 

Tom Frajer
Replied On October 4, 2016 11:32 AM UTC

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

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

Hi Tom, 

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

Shyam G 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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