Aspose.Tasks.Examples.CSharp.Articles.RenderDifferentPresentationFormatsToXAML.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        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
        }
    }
RenderDifferentPresentationFormatsToXAML