SaveOptionsGridlines Property

Gets or sets a list of Gridline that appear in project view.

Namespace:  Aspose.Tasks.Saving
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 20.11
public List<Gridline> Gridlines { get; set; }

Property Value

Type: ListGridline
Shows how to save layout to separate files.
var project = new Project(DataDir + "CreateProject2.mpp");
var options = new ImageSaveOptions(SaveFileFormat.PNG);
options.StartDate = project.Get(Prj.StartDate).AddDays(-3);
options.EndDate = project.Get(Prj.FinishDate);
options.MarkCriticalTasks = true;
options.LegendOnEachPage = false;
options.DefaultFontName = "Segoe UI Black";
options.UseProjectDefaultFont = false;

options.Gridlines = new List<Gridline>();

var gridline = new Gridline { GridlineType = GridlineType.GanttRow, Color = Color.CornflowerBlue, Pattern = LinePattern.Dashed };

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