Share via


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.Object

    An object that identifies the Gantt bar style to be defined. Tasks select a row style for a collection by using this parameter.

  • barStartShapeColor
    Type: System.Drawing.Color

    A Color structure that represents an ARGB (alpha, red, green, blue) color to be applied to the beginning of the Gantt bar.

  • barEndShapeColor
    Type: System.Drawing.Color

    A Color structure that represents an ARGB (alpha, red, green, blue) color to be applied to the end of the Gantt bar.

  • startFieldName
    Type: System.String

    A string that provides a label for the beginning field in the Gantt bar.

  • endFieldName
    Type: System.String

    A string that provides a label for the ending field in the Gantt bar.

  • linkPriority
    Type: System.Int32

    A 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));

See Also

Reference

GanttBarStyle Class

GanttBarStyle Members

Microsoft.SharePoint.JSGrid Namespace