Rendering Project to XAML

Contents
[ Hide Show ]

Aspose.Tasks for .NET 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 with Options

The following code sample demonstrates how this feature can be used in C#.NET and VB.NET:

1Project project = new Project("New Project.mpp");
2project.Save("RenderToXAML_out.xaml", SaveFileFormat.XAML);
1Project project = new Project("New Project.mpp");
2SaveOptions options = new XamlOptions();
3options.FitContent = true;
4options.LegendOnEachPage = false;
5options.Timescale = Timescale.ThirdsOfMonths;
6project.Save("RenderXAMLWithOptions_out.xaml", options);

Different presentation formats can be used to render the project to XAML:

1Project project = new Project("New Project.mpp");
2SaveOptions options = new XamlOptions();
3options.PresentationFormat = PresentationFormat.GanttChart;
4project.Save("RenderDifferentPresentationFormatsToXAML_out.xaml", options);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.