You can find detailed information at: Convert MS Project MPP to XAML Format using C#
Last active
September 2, 2021 10:57
-
-
Save aspose-com-gists/6268d176bd53cc58f9e210d92e250476 to your computer and use it in GitHub Desktop.
Convert MS Project MPP to XAML Format using C#
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
// Load the MPP file | |
Project project = new Project("SourceDirectory\\Tasks\\project_test.mpp"); | |
// Save the MPP file as XAML | |
project.Save("OutputDirectory\\SaveProjectAsXAML_out.xaml", SaveFileFormat.XAML); |
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
// Load the MPP file | |
Project project = new Project("SourceDirectory\\Tasks\\project_test.mpp"); | |
// Initialize the XamlOptions class | |
SaveOptions options = new XamlOptions(); | |
options.FitContent = true; | |
options.LegendOnEachPage = false; | |
options.Timescale = Timescale.ThirdsOfMonths; | |
// Save the MPP file as XAML | |
project.Save("OutputDirectory\\SaveProjectAsXAMLWithOptions_out.xaml", options); |
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
// Load the MPP file | |
Project project = new Project("SourceDirectory\\Tasks\\project_test.mpp"); | |
// Initialize the XamlOptions class | |
SaveOptions options = new XamlOptions(); | |
options.PresentationFormat = PresentationFormat.GanttChart; | |
// Save the MPP file as XAML | |
project.Save("OutputDirectory\\RenderDifferentPresentationFormatsToXAML_out.xaml", options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment