Essential Gantt for WPF is a MS Project-like Project Viewer with built-in grid, schedule and resource assignment constraints. It is designed to assist project managers in developing plans, assigning resources to the task, tracking task progress and so on. Some of the key features of Gantt control are: drag support for increasing and decreasing the Start and Finish Date of the Task, Drag and Drop support for the task within a row and automatic data synchronization between Grid and Chart. This page has information about the Gantt Control.
On this page:
Table of Contents | ||||
---|---|---|---|---|
|
Requirements
This control is available only for Windows WPF applications
Configuration
- Go to Displays / Draw.
- On the Components Panel, select Charts, then GanttChart.
- Click or drag-and-drop it on the Drawing area to use it.
- Double-click the object to open the configuration window.
Configuration | Description |
---|---|
Control Name | Defines the name used to identify the control. |
Data Source | Specifies the data source used to populate the Gantt chart. |
Visual Style | Enables you to customize the appearance of the control. The available options for Visual Style are: VS2010 Blend Metro Office2010Blue Office2010Black Office2010Silver |
Connector Stroke | Sets the color for the connector lines between tasks. |
Schedule Background | Specifies the background color of the schedule area. |
Schedule Foreground | Defines the text color for the schedule area. |
Task Node Background | Sets the background color for the task nodes. |
Grid Header Background | Specifies the background color of the grid header. |
Grid Header Foreground | Defines the text color of the grid header. |
Show Chart Lines | Toggles the visibility of lines between chart elements. |
Show Non-Working Hours Background | Displays the background color for non-working hours. |
Use Auto Update Hierarchy | Enables automatic updates for hierarchical task dependencies. |
Show Baseline | Toggles the visibility of the project baseline on the chart. |
Baseline Color | Sets the color for the baseline representation on the chart. |
Baseline Thickness | Specifies the thickness of the baseline line. |
Field Name | Selects the data field used for the specific column (e.g., TaskName, StartDateTime). |
Column Name | Defines the custom name for the selected column. |
With the instance below, it is possible to access all properties of Gantt Control.
Note |
---|
To configure the Gantt control in the CodeBehind, create an instance for Gantt Control:
|
Below are the properties listed, which are not exposed in the Gantt Control configuration window but you can still make use of it through the CodeBehind.
Property | Description |
---|---|
Predecessor | Enables you to set the relationship between the tasks. |
GanttTaskRelationship | Contains four relationships: StartToStart, StartToFinish, FinishToFinish, FinishToStart. |
ValidationMode | Contains two modes: Manual & Auto (Default value is Manual). |
UseAutoUpdateHierarchy | Enable or disable the auto update hierarchy support. |
ToolTipTemplate | Gets or sets the TaskBarCollection Property of GanttControl. |
CustomScheduleSource | Gets/Sets the custom schedule items Source of the Gantt. |
CellDate | Gets/Sets the current schedule cell date in the datetime schedule. |
CellToolTip | Gets/Sets the current schedule cell tool tip. |
CellTimeUnit | Gets/Sets the current schedule row time unit, like weeks, months and so on. |
Content | Gets/Sets the current schedule cell content. |
WeekBeginsOn | Gets or sets the starting day of a week in the project schedule. Default is Sunday. |
FiscalYearBeginsOn | Gets or sets the starting month of a fiscal year. Default is January. |
IsFYNumberingEnabled | Gets or sets the Fiscal Year Numbering. If this property is changed, it will be reflected in the schedule. By default, FY Numbering is set to false. |
DefaultStartTime | Gets or sets the task starting time in a day. This is based on the GanttTime class of the Gantt control. Default is 9.00 AM. |
DefaultEndTime | Gets or sets the task ending time in a day. This is based on the GanttTime class of the Gantt control. Default is 6.00 PM. |
Weekends | Gets or sets the weekend days. Default value is Saturday, Sunday. |
ShowWeekends | Enables or disables the weekend days in schedule. Default value is true. |
ExcludeWeekends | Excludes or includes the weekend days in duration calculation. Default value is false. |
ShowNonWorkingHoursBackground | Enables or disables the background for weekend days. Default value is true. |
UseOnDemandSchedule | To get the expected performance you need to use dynamic schedule rendering. |
BaseCellMaxLength | Splits the schedule cells by comparing the cell size with the API value on zooming-in |
BaseCellMinLength | Merges schedule cells by comparing the cell size with the API value on zooming-out |
ZoomFactor | Zooming takes place based on the ZoomFactor. The ZoomFactor should be greater than zero. |
HighlightedItems | The items that are passed through this API will be highlighted in Gantt chart region. The items should be in linear form. |
HighlightItemBrush | Specifies the color in which items should be highlight |
CurrentDateLine | Gets the user-defined line for the DateTime indicator. |
StickCurrentDateLineTo | Get/sets the StickCurrentDateLineTo property of the Gantt control. Default is Today. |
Background | Gets/sets background color of strip line. |
Content | Gets/sets the content of the strip line. |
ContentTemplate | Gets/sets the content template of the strip line. |
ContentTemplateSelector | Gets/sets the TemplateSelector of the strip line. |
StartDate | Gets/sets the start date of the strip line. |
EndDate | Gets/sets the end date of the strip line. |
RepeatBehavior | Gets/sets the repeat behavior of the strip line. |
RepeatFor | Gets/sets the intervals between the repeating strip lines. |
RepeatUpto | Gets/sets DateTime value. The strip line will be repeated up to this value. |
Style | Gets/sets the style for the strip line. |
StyleSelector | Gets/sets the style selector of the strip line. |
VerticalContentAlignment | Gets/sets the vertical alignment of the content present in the strip line. |
HorizontalContentAlignment | Gets/sets the horizontal alignment of the content present in the strip line. |
Type | Gets/sets the type of the strip line. |
Position | Gets/sets the absolute position of the strip line for Absolute strip line type. |
Height | Gets/sets the absolute height of the strip line for Absolute strip line type. |
Width | Get/sets the absolute width of the strip line for Absolute strip line type. |
ShowStripLines | Gets the user option to show the strip lines. |
StripLines | Get/sets the collection of StripLineInfo from the user. |
Note |
---|
To configure the Gantt control in the CodeBehind, create an instance for Gantt Control:
|
. |
Column Mapping
Click the Add button to add a column to the list.
To map user table column with default column, you need to configure the field and column name properties.
Select Field and map the user column with column name textbox
E.g.: In Field, we selected “TaskId” from the default column and I have mapped user column “ID” to the default “TaskId” column, as in the image above.
Note |
---|
In user table, input for ParentId,PrecedesserTaskId and PredecessorDependencyRelation columns should be empty string or NULL if there is no data. |
Click OK to save the configuration.
Runtime
To view the data in the runtime as shown in the screenshot below, you need to configure DataSource in the Gantt Control configuration window. It can be a tag or a dataset
In this section:
Page Tree | ||||
---|---|---|---|---|
|