ComponentOne GanttView for WinForms
Step 4 of 4: Styling the Task Bars
GanttView for WinForms Quick Start > Step 4 of 4: Styling the Task Bars

In this step you will learn how to modify the style of the task bars for the automatic and manual tasks using the C1GanttView.BarStyles Collection Editor.

To modify the bar styles at design time:

  1. Right-click on the C1GanttView control and select Edit Bar Styles.
    The C1GanttView.BarStyles Collection Editor appears.
  2. Click Add to add a bar style to the collection.
  3. Set the BarType to AutoTask.
  4. Set the BarShape to ThickBar.
  5. Set the BarColor to LightSkyBlue.
  6. Click Add to add a bar style to the collection.
  7. Set the BarType to ManualTask.
  8. Set the BarShape to ThickBar.
  9. Set the BarColor to PaleGreen.
  10. 10.  Click OK to save and close the C1GanttView.BarStyles Collection Editor.

To modify the bar styles for a specific task at design time:

  1. Right-click on the control and select Edit Tasks.
    The C1GanttView.Tasks Collection Editor appears.
  2. Select the Analysis and Design task and click on the ellipsis button next to the BarStyles.
    The C1GanttView.BarStyles Collection Editor appears.
  3. Click Add to add a bar style to the collection.
  4. Set the BarType to AutoTask.
  5. Set the BarShape to TopBar.
  6. Set the StartShape and EndShape to 2.
  7. Set RightText2 to ResourceNames.

For more information see Bar Styles.

 What You've Accomplished

Congratulations! You have successfully completed the C1GanttView quick start. In this topic, you added a C1GanttView control to your windows form, added tasks, customized its behavior and appearance, and manipulated the control at run time.