GanttBarFillPattern Enumeration |
A shape's fill pattern.
Namespace:
Aspose.Tasks.Visualization
Assembly:
Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntaxpublic enum GanttBarFillPattern
Public Enumeration GanttBarFillPattern
public enum class GanttBarFillPattern
Members|
| Member name | Value | Description |
|---|
| Hollow | 0 |
Hollow pattern.
|
| SolidFill | 1 |
Solid fill pattern.
|
| LightFill | 2 |
Light fill pattern.
|
| MediumFill | 3 |
Medium fill pattern.
|
| DarkFill | 4 |
Dark fill pattern.
|
| DiagonalLeft | 5 |
Diagonal left pattern (from the upper left to the lower right).
|
| DiagonalRight | 6 |
Diagonal right pattern (from the upper right to the lower left).
|
| DiagonalCross | 7 |
Diagonal cross pattern.
|
| LineVertical | 8 |
Line vertical pattern.
|
| LineHorizontal | 9 |
Line horizontal pattern.
|
| LineCross | 10 |
Line cross pattern.
|
| SolidFillWithDashedBorder | 11 |
Solid with dashed border pattern.
|
ExamplesShows how to set custom bar styles of Gantt Chart project view.
public void ImplementCustomBarStyle()
{
try
{
var project = new Project(DataDir + "Blank2010.mpp");
project.RootTask.Children.Add("Task");
var view = (GanttChartView)project.DefaultView;
var custom = GetCustomBarStyle();
view.CustomBarStyles.Add(custom);
var options = new MPPSaveOptions
{
WriteViewData = true
};
project.Save(OutDir + "ImplementCustomBarStyleWriting_out.mpp", options);
}
catch (NotSupportedException ex)
{
Console.WriteLine(
ex.Message
+ "\nThis example will only work if you apply a valid Aspose License. You can purchase full license or get 30 day temporary license from http://www.aspose.com/purchase/default.aspx.");
}
}
public static GanttBarStyle GetCustomBarStyle()
{
var style = new GanttBarStyle
{
ShowForTaskUid = 1,
MiddleShape = GanttBarMiddleShape.RectangleBottom,
MiddleFillPattern = GanttBarFillPattern.MediumFill,
MiddleShapeColor = Color.Blue,
StartShape = GanttBarEndShape.ArrowDown,
StartShapeColor = Color.Red,
EndShape = GanttBarEndShape.ArrowUp,
EndShapeColor = Color.Yellow,
LeftField = Field.TaskResourceNames,
RightField = Field.TaskName,
TopField = Field.TaskStart,
BottomField = Field.TaskFinish,
InsideField = Field.TaskDuration
};
return style;
}
See Also