Gridline

Gridline class

The horizontal or vertical line that appears in the project view.

public class Gridline

Constructors

NameDescription
Gridline()Initializes a new instance of the Gridline class.

Properties

NameDescription
Color { get; set; }Gets or sets the Color of a gridline.
GridlineType { get; set; }Gets or sets the type of gridline (GridlineType).
Pattern { get; set; }Gets or sets the LinePattern of a gridline.

Methods

NameDescription
override Equals(object)Returns a flag indicating whether this instance is equal to the specified object.
override GetHashCode()Returns a hash code value for the instance of the Gridline class.

Examples

Shows how to work with gridlines while save in visual formats.

var project = new Project(DataDir + "CreateProject2.mpp");
var options = new ImageSaveOptions(SaveFileFormat.Png);

var gridline = new Gridline
{
    // set the type of gridline (<see cref="P:Aspose.Tasks.Visualization.Gridline.GridlineType" />).
    GridlineType = GridlineType.GanttRow, 
    // set the <see cref="T:Aspose.Tasks.Visualization.LinePattern" /> of a gridline
    Pattern = LinePattern.Dashed
};

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

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

See Also