GanttStyleInfo.AddBarStyle Method
Adds a bar style definition to a Microsoft.SharePoint.JSGrid Gantt chart.
Namespace: Microsoft.SharePoint.JSGrid
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub AddBarStyle ( _
barStyle As GanttBarStyle _
)
'Usage
Dim instance As GanttStyleInfo
Dim barStyle As GanttBarStyle
instance.AddBarStyle(barStyle)
public void AddBarStyle(
GanttBarStyle barStyle
)
Parameters
barStyle
Type: Microsoft.SharePoint.JSGrid.GanttBarStyleAn object that represents a style to be applied to a bar.
Remarks
This example demonstrates how to use the AddBarStyle method to create a summary Gantt bar style.
/*Summary Bar Style*/
styleInfoObj. AddBarStyle(new GanttBarStyle(
CustomBarStyle.Summary, BarShape.TopHalf, Color.Gray, BarPattern.Solid,
BarEndShape.HomePlateDown, Color.Gray, BarShapePattern.Filled,
BarEndShape.HomePlateDown, Color.Gray, BarShapePattern.Filled,
"START_DATE", "FINISH_DATE", 1));
'Summary Bar Style
styleInfoObj. AddBarStyle(New GanttBarStyle(CustomBarStyle.Summary, BarShape.TopHalf, Color.Gray, BarPattern.Solid, BarEndShape.HomePlateDown, Color.Gray, BarShapePattern.Filled, BarEndShape.HomePlateDown, Color.Gray, BarShapePattern.Filled, "START_DATE", "FINISH_DATE", 1))