Check Page Autoexpand
Contents
[
Hide
]
Change Page Size
The Page object represents the drawing area of a foreground page or a background page. The Pages property exposed by the Diagram class supports a collection of Aspose.Diagram.Page objects. The PageProps object represents the page attributes, such as the page width, height, and scale. This property can be used to check page’s autoexpand.
Use the PageProps property to check page’s autoexpand.
Set Page Size Programming Sample
The following piece of code check page’s autoexpand from a diagram.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_VisioPages(); | |
// Initialize the new visio diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
// Get Visio page | |
Aspose.Diagram.Page page = diagram.Pages.GetPage("Flow 1"); | |
// Get Page autoexpand | |
bool isAutoExpand = page.PageSheet.PageProps.DrawingResizeType.Value == DrawingResizeTypeValue.Automatically ? true : false; | |
//Set Page autoexpand | |
page.PageSheet.PageProps.DrawingResizeType.Value = DrawingResizeTypeValue.NotAutomatically; | |
// Save Visio | |
diagram.Save(dataDir + "SetAutoExpand_out.vsdx", SaveFileFormat.VSDX); |