New to Telerik UI for WPFStart a free 30-day trial

Represents the objects displayed from RadGanttView control. Every task can be a milestone, summary and a regular task.

Definition

Namespace:Telerik.Windows.Controls.GanttView

Assembly:Telerik.Windows.Controls.GanttView.dll

Syntax:

C#
public class GanttTask : PropertyChangedBase, INotifyPropertyChanged, IGanttTask, IResourceContainer, IStateProvider, IMilestone, ISummary, IHierarchical, IDateRange, IEditableHierarchical, IDependant

Inheritance: objectPropertyChangedBaseGanttTask

Implements: IDateRangeIDependantIEditableHierarchicalIGanttTaskIHierarchicalIMilestoneINotifyPropertyChangedIResourceContainerIStateProviderISummary...

Inherited Members PropertyChangedBase.OnPropertyChanged(string)PropertyChangedBase.OnPropertyChanged<T>(Expression<Func<T>>)PropertyChangedBase.PropertyChanged

Constructors

Initializes a new instance of the GanttTask class.

C#
public GanttTask()

Initializes a new instance of the GanttTask class.

C#
public GanttTask(DateTime start, DateTime end, string title)
Parameters:startDateTime

The start.

endDateTime

The end.

titlestring

The title.

Initializes a new instance of the GanttTask class.

C#
public GanttTask(DateTime start, DateTime end)
Parameters:startDateTime

The start.

endDateTime

The end.

Properties

Gets the children (subtasks).

C#
public IList<IGanttTask> Children { get; }

Gets or set the deadline date of the task. This property is also used for calculating the critical path.

C#
public DateTime? Deadline { get; set; }

Implements: IGanttTask.Deadline

Collection with relations to other tasks.

C#
public IList<IDependency> Dependencies { get; }

Gets or set the description of the task.

C#
public string Description { get; set; }

Implements: IGanttTask.Description

Gets or set the duration of the task.

C#
public TimeSpan Duration { get; set; }

Implements: IGanttTask.Duration

Gets or sets the end.

C#
public DateTime End { get; set; }
Property Value:

The end.

Implements: IDateRange.End

Gets whether the GanttTask is expired, i.e. its Start or End is after the Deadline date.

C#
public bool IsExpired { get; }

Gets or sets a value indicating whether the instance is a milestone.

C#
public bool IsMilestone { get; set; }

Implements: IMilestone.IsMilestone

Gets a value indicating whether the instance is a summary.

C#
public bool IsSummary { get; }

Implements: ISummary.IsSummary

Gets or set the progress in percent of completion of the task.

C#
public double Progress { get; set; }

Implements: IGanttTask.Progress

Collection with all resources associated with this task.

C#
public IList<IResource> Resources { get; }

Gets or sets the start.

C#
public DateTime Start { get; set; }
Property Value:

The start.

Implements: IDateRange.Start

Gets or set the title of the task.

C#
public string Title { get; set; }

Implements: IGanttTask.Title

Gets or sets the unique id.

C#
public string UniqueId { get; set; }
Property Value:

The unique id.

Methods

Adds a dependency to the task. Returns the created dependency.

C#
public IDependency AddDependency(IGanttTask fromTask, DependencyType type)
Parameters:fromTaskIGanttTask

A IGanttTask from which the dependency will be added.

typeDependencyType

The type of the dependency.

Returns:

IDependency

Returns an object the added dependency.

Implements: IDependant.AddDependency(IGanttTask, DependencyType)

C#
protected virtual bool CheckIsExpired()
Returns:

bool

C#
protected override void OnPropertyChanged(PropertyChangedEventArgs args)
Parameters:argsPropertyChangedEventArgs

Overrides: PropertyChangedBase.OnPropertyChanged(PropertyChangedEventArgs)

Removes a dependency from a task.

C#
public bool RemoveDependency(IDependency dependency)
Parameters:dependencyIDependency

The dependency to be removed.

Returns:

bool

Returns true if item is successfully removed; otherwise, false. This method also returns false if item was not found into the collection of dependencies.

Implements: IDependant.RemoveDependency(IDependency)

Returns a string that represents this instance.

C#
public override string ToString()
Returns:

string

A string that represents this instance.

Overrides: object.ToString()