SaveOptionsMarkCriticalTasks Property

Gets or sets a value indicating whether critical tasks should be displayed in red color (Default value is FALSE).

Namespace:  Aspose.Tasks.Saving
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 20.5
Syntax
public bool MarkCriticalTasks { get; set; }

Property Value

Type: Boolean
Examples
Shows how to print critical tasks while save in image file formats.
var project = new Project(DataDir + "CreateProject2.mpp");
var options = new ImageSaveOptions(SaveFileFormat.PNG)
{
    StartDate = project.Get(Prj.StartDate).AddDays(-3),
    EndDate = project.Get(Prj.FinishDate),
    MarkCriticalTasks = true,
    LegendOnEachPage = false,
    Gridlines = new List<Gridline>()
};

var gridline = new Gridline { GridlineType = GridlineType.GanttRow, Color = Color.CornflowerBlue, Pattern = LinePattern.Dashed };
options.Gridlines.Add(gridline);

project.Save(OutDir + "PrintProjectPagesToSeparateFiles1_out.png", options);

// Save project layout to separate files
options.SaveToSeparateFiles = true;
project.Save(OutDir + "PrintProjectPagesToSeparateFiles2_out.png", options);
See Also