Gridline Class

The horizontal or vertical line that appears in the project view.
Inheritance Hierarchy
SystemObject
  Aspose.Tasks.VisualizationGridline

Namespace:  Aspose.Tasks.Visualization
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 20.5
Syntax
public class Gridline

The Gridline type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleGridline
Initializes a new instance of the Gridline class.
Properties
  NameDescription
Public propertyCode exampleColor
Gets or sets the Color of a gridline.
Public propertyCode exampleGridlineType
Gets or sets the type of gridline (GridlineType).
Public propertyCode examplePattern
Gets or sets the LinePattern of a gridline.
Methods
  NameDescription
Public methodCode exampleEquals
Returns a flag indicating whether this instance is equal to the specified object.
(Overrides ObjectEquals(Object).)
Protected methodFinalize (Inherited from Object.)
Public methodCode exampleGetHashCode
Returns a hash code value for the instance of the Gridline class.
(Overrides ObjectGetHashCode.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
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