This topic explains how you create a milestone using the xamGantt™ control.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The milestone is a special project task with a duration of zero days.
Usually, milestones marks a major event or an important deliverable in the project plan.
You configure a task to be a milestone either:
by setting the ProjectTask IsMilestone property to true
or by setting the ProjectTask Duration property to zero
The milestone is indicated both in the grid and chart xamGantt section.
In the grid section, the Milestone column indicates whether or not a task is a milestone
In the chart section, the milestone appears as a diamond symbol
The following table maps the desired configuration to property settings.
The example below demonstrates how to set a milestone:
In C#:
XamGantt gantt = new XamGantt();
Project project = new Project();
ProjectTask task = new ProjectTask();
task.TaskName = "Milestone";
task.IsManual = false;
//Setting a milestone
task.IsMilestone = true;
task.Start = DateTime.Today.ToUniversalTime();
project.RootTask.Tasks.Add(task);
gantt.Project = project;
In Visual Basic:
Dim gantt As New XamGantt()
Dim project As New Project()
Dim task As New ProjectTask()
task.TaskName = "Milestone"
task.IsManual = False
'Setting a milestone
task.IsMilestone = True
task.Start = DateTime.Today.ToUniversalTime()
project.RootTask.Tasks.Add(task)
gantt.Project = project
The following topics provide additional information related to this topic.