GanttBarStyle Constructor
Initializes a new instance of the GanttBarStyle class.
Namespace: Microsoft.SharePoint.JSGrid
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub New ( _
id As Object, _
shape As BarShape, _
color As Color, _
pattern As BarPattern, _
barStartShape As BarEndShape, _
barStartShapeColor As Color, _
barStartPattern As BarShapePattern, _
barEndShape As BarEndShape, _
barEndShapeColor As Color, _
barEndPattern As BarShapePattern, _
startFieldName As String, _
endFieldName As String, _
linkPriority As Integer _
)
'Usage
Dim id As Object
Dim shape As BarShape
Dim color As Color
Dim pattern As BarPattern
Dim barStartShape As BarEndShape
Dim barStartShapeColor As Color
Dim barStartPattern As BarShapePattern
Dim barEndShape As BarEndShape
Dim barEndShapeColor As Color
Dim barEndPattern As BarShapePattern
Dim startFieldName As String
Dim endFieldName As String
Dim linkPriority As Integer
Dim instance As New GanttBarStyle(id, shape, _
color, pattern, barStartShape, barStartShapeColor, _
barStartPattern, barEndShape, barEndShapeColor, _
barEndPattern, startFieldName, endFieldName, _
linkPriority)
public GanttBarStyle(
Object id,
BarShape shape,
Color color,
BarPattern pattern,
BarEndShape barStartShape,
Color barStartShapeColor,
BarShapePattern barStartPattern,
BarEndShape barEndShape,
Color barEndShapeColor,
BarShapePattern barEndPattern,
string startFieldName,
string endFieldName,
int linkPriority
)
Parameters
id
Type: System.ObjectAn object that identifies the Gantt bar style to be defined. Tasks select a row style for a collection by using this parameter.
shape
Type: Microsoft.SharePoint.JSGrid.BarShapeA BarShape enumeration value that indicates the size and location of the Gantt bar.
color
Type: System.Drawing.ColorA Color structure that represents an ARGB (alpha, red, green, blue) color.
pattern
Type: Microsoft.SharePoint.JSGrid.BarPatternA BarPattern enumeration value that indicates the pattern to be applied to the background of the Gantt bar.
barStartShape
Type: Microsoft.SharePoint.JSGrid.BarEndShapeA member of the BarEndShape enumeration that indicates the shape to be displayed at the start of the Gantt bar.
barStartShapeColor
Type: System.Drawing.ColorA Color structure that represents an ARGB (alpha, red, green, blue) color to be applied to the beginning of the Gantt bar.
barStartPattern
Type: Microsoft.SharePoint.JSGrid.BarShapePatternA BarShapePattern enumerand that indicates whether the bar shape is displayed as filled or hollow.
barEndShape
Type: Microsoft.SharePoint.JSGrid.BarEndShapeA member of the BarEndShape enumeration that indicates the shape to be displayed at the end of the Gantt bar.
barEndShapeColor
Type: System.Drawing.ColorA Color structure that represents an ARGB (alpha, red, green, blue) color to be applied to the end of the Gantt bar.
barEndPattern
Type: Microsoft.SharePoint.JSGrid.BarShapePatternA BarShapePattern enumerand that indicates whether the bar shape is displayed as filled or hollow.
startFieldName
Type: System.StringA string that provides a label for the beginning field in the Gantt bar.
endFieldName
Type: System.StringA string that provides a label for the ending field in the Gantt bar.
linkPriority
Type: System.Int32A 32-bit integer value that indicates the priority of the link.
Remarks
This example demonstrates how to create a Gantt bar.
/*Standard Bar Style*/
styleInfoObj.AddBarStyle(new GanttBarStyle(
CustomBarStyle.Standard, BarShape.Full, Color.Blue, BarPattern.Empty,
BarEndShape.None, Color.Black, BarShapePattern.Filled,
BarEndShape.None, Color.Black, BarShapePattern.Filled,
"Start Date", "Finish Date", 1));