Rendering Project to XAML
Contents
[
Hide
Show
]Aspose.Tasks for Java lets you render project data to an XAML file. The easiest way to accomplish this task is to use the SaveFileFormat.XAML option with the Project.Save function. SaveOptions can be used to set the options like FitContent, LegendOnEachPage, TimeScale and View. GanttChartView and GanttChartColumn can be used to select the columns for display.
Rendering to XAML
The following code sample demonstrates how this feature can be used using Aspose.Tasks for Java:
1Project project = new Project("RenderMe.mpp");
2project.save("NewProductDev.xaml", SaveFileFormat.XAML);
Render XAML with Options
1Project project = new Project("NewProductDev.mpp");
2SaveOptions options = new XamlOptions();
3options.setFitContent(true);
4options.setLegendOnEachPage(false);
5options.setTimescale(Timescale.ThirdsOfMonths);
6project.save("NewProductDev.xaml", options);
Render to XAML using Different Presentation Formats
Different presentation formats can be used to render the project to XAML: PresentationFormat.GanttChart, PresentationFormat.TaskUsage, PresentationFormat.ResourceUsage and PresentationFormat.ResourceSheet.
1Project project = new Project("NewProductDev.mpp");
2SaveOptions options = new XamlOptions();
3options.setPresentationFormat(PresentationFormat.GanttChart);
4project.save("NewProductDev GanttChart.xaml", options);