How to change the default orientation of the diagram page?

Does anyone know how to change the default orientation of the diagram page?
By default, on form load, the diagram page is Portrait.  If I want to change it to landscape, how can I do that? 
The following code doesn't change anything:
diagram.view.PageSetting.Landsacape = True



1 Reply

NG Naganathan Ganesh Babu Syncfusion Team January 2, 2018 09:25 AM UTC

Hi Allen, 
 
The diagram control doesn’t have a built-in support to change orientation of the diagram page while initializing the diagram. Also, the below mention code (which is given by you) is used to setting and print the diagram document in Landscape/Portrait mode alone.  
 
diagram.view.PageSetting.Landsacape = True 
 
However, we suggest you to use diagram Model’s “DocumentSize” property to swapping the width and height values to change the diagram as landscape mode as per your requirement.  
 
code example: 
 
[C#] 
 
diagram1.Model.DocumentSize.Height += diagram1.Model.DocumentSize.Width; 
diagram1.Model.DocumentSize.Width = diagram1.Model.DocumentSize.Height - diagram1.Model.DocumentSize.Width; 
diagram1.Model.DocumentSize.Height -= diagram1.Model.DocumentSize.Width; 
 
Regards, 
 
Naganathan K G  


Loader.
Up arrow icon