public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);
// ExStart:RenderDifferentPresentationFormatsToXAML
Project project = new Project(dataDir + "Project2.mpp");
PresentationFormat presentationFormat = PresentationFormat.GanttChart;
string resultFile = "RenderDifferentPresentationFormatsToXAML_" + presentationFormat + "_out.xaml";
SaveOptions options = new XamlOptions();
options.PresentationFormat = presentationFormat;
project.Save(dataDir + resultFile, options);
// ExEnd:RenderDifferentPresentationFormatsToXAML
}
}