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