Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active March 29, 2022 22:53
Convert Visio VSD VSDX to XAML Programmatically in C# .NET
// Load input Visio diagram
Diagram diagram = new Diagram("Input.vsd");
// Create an instance of XAMLSaveOptions class
XAMLSaveOptions options = new XAMLSaveOptions();
options.SaveFormat = SaveFileFormat.Xaml;
// Save the output XAML file
diagram.Save("output.xaml", options);
// Load input Visio diagram
Diagram diagram = new Diagram("Input.vsdx");
// Create an instance of XAMLSaveOptions class
XAMLSaveOptions options = new XAMLSaveOptions();
options.SaveFormat = SaveFileFormat.Xaml;
// Save the output XAML file
diagram.Save("output.xaml", options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment