Class
GanttTask

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:

cs-api-definition
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

GanttTask()

Initializes a new instance of the GanttTask class.

Declaration

cs-api-definition
public GanttTask()

GanttTask(DateTime, DateTime)

Initializes a new instance of the GanttTask class.

Declaration

cs-api-definition
public GanttTask(DateTime start, DateTime end)

Parameters

start

DateTime

The start.

end

DateTime

The end.

GanttTask(DateTime, DateTime, string)

Initializes a new instance of the GanttTask class.

Declaration

cs-api-definition
public GanttTask(DateTime start, DateTime end, string title)

Parameters

start

DateTime

The start.

end

DateTime

The end.

title

string

The title.

Properties

Children

Gets the children (subtasks).

Declaration

cs-api-definition
public IList<IGanttTask> Children { get; }

Property Value

IList<IGanttTask>

Deadline

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

Declaration

cs-api-definition
public DateTime? Deadline { get; set; }

Property Value

DateTime?

Implements IGanttTask.Deadline

Dependencies

Collection with relations to other tasks.

Declaration

cs-api-definition
public IList<IDependency> Dependencies { get; }

Property Value

IList<IDependency>

Description

Gets or set the description of the task.

Declaration

cs-api-definition
public string Description { get; set; }

Property Value

string

Implements IGanttTask.Description

Duration

Gets or set the duration of the task.

Declaration

cs-api-definition
public TimeSpan Duration { get; set; }

Property Value

TimeSpan

Implements IGanttTask.Duration

End

Gets or sets the end.

Declaration

cs-api-definition
public DateTime End { get; set; }

Property Value

DateTime

The end.

Implements IDateRange.End

IsExpired

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

Declaration

cs-api-definition
public bool IsExpired { get; }

Property Value

bool

IsMilestone

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

Declaration

cs-api-definition
public bool IsMilestone { get; set; }

Property Value

bool

Implements IMilestone.IsMilestone

IsSummary

Gets a value indicating whether the instance is a summary.

Declaration

cs-api-definition
public bool IsSummary { get; }

Property Value

bool

Implements ISummary.IsSummary

Progress

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

Declaration

cs-api-definition
public double Progress { get; set; }

Property Value

double

Implements IGanttTask.Progress

Resources

Collection with all resources associated with this task.

Declaration

cs-api-definition
public IList<IResource> Resources { get; }

Property Value

IList<IResource>

Start

Gets or sets the start.

Declaration

cs-api-definition
public DateTime Start { get; set; }

Property Value

DateTime

The start.

Implements IDateRange.Start

Title

Gets or set the title of the task.

Declaration

cs-api-definition
public string Title { get; set; }

Property Value

string

Implements IGanttTask.Title

UniqueId

Gets or sets the unique id.

Declaration

cs-api-definition
public string UniqueId { get; set; }

Property Value

string

The unique id.

Methods

AddDependency(IGanttTask, DependencyType)

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

Declaration

cs-api-definition
public IDependency AddDependency(IGanttTask fromTask, DependencyType type)

Parameters

fromTask

IGanttTask

A IGanttTask from which the dependency will be added.

type

DependencyType

The type of the dependency.

Returns

IDependency

Returns an object the added dependency.

Implements IDependant.AddDependency(IGanttTask, DependencyType)

CheckIsExpired()

Declaration

cs-api-definition
protected virtual bool CheckIsExpired()

Returns

bool

OnPropertyChanged(PropertyChangedEventArgs)

Declaration

cs-api-definition
protected override void OnPropertyChanged(PropertyChangedEventArgs args)

Parameters

args

PropertyChangedEventArgs

Overrides PropertyChangedBase.OnPropertyChanged(PropertyChangedEventArgs)

RemoveDependency(IDependency)

Removes a dependency from a task.

Declaration

cs-api-definition
public bool RemoveDependency(IDependency dependency)

Parameters

dependency

IDependency

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)

ToString()

Returns a string that represents this instance.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents this instance.

Overrides object.ToString()