PeriodSpan
ViewModel that represents a time period.
Definition
Namespace:Telerik.Windows.Controls.TimeBar
Assembly:Telerik.Windows.Controls.DataVisualization.dll
Syntax:
public class PeriodSpan : ViewModelBase, INotifyPropertyChanged, IDisposable, IComparable, IComparable<DateTime>, IComparable<PeriodSpan>, IPeriodSpan
Inheritance: objectViewModelBasePeriodSpan
Implements:
Inherited Members
Constructors
Initializes a new instance of the PeriodSpan class.
Properties
Gets the end of the time period.
public DateTime EndDate { get; }
The end of the time period.
Implements:
Gets the span of the time period.
public TimeSpan Interval { get; }
The span of the time period.
Implements:
Gets or sets the label that represents the time period.
public string Label { get; set; }
The label that represents the time period.
Gets the start of the time period.
public DateTime StartDate { get; }
The start of the time period.
Implements:
Methods
Compares the current instance with another DateTime and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(DateTime other)
A DateTime object to compare with this instance.
Returns:A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings:
Value Meaning Less than zero This object is less than the other parameter.
Zero This object is equal to other.
Greater than zero This object is greater than other.
Implements:
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(object obj)
An object to compare with this instance.
Returns:A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes obj in the sort order.
Zero This instance occurs in the same position in the sort order as obj.
Greater than zero This instance follows obj in the sort order.
obj is not the same type as this instance.
Implements:
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(PeriodSpan other)
A PeriodSpan object to compare with this instance.
Returns:A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings:
Value Meaning Less than zero This object is less than the other parameter.
Zero This object is equal to other.
Greater than zero This object is greater than other.
Implements:
Returns a hash code for this instance.
public override int GetHashCode()
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides:
Operators
The inequality operator (!=) returns false if its operands are equal, true otherwise.
public static bool operator !=(PeriodSpan periodSpan1, PeriodSpan periodSpan2)
The first PeriodSpan operand.
periodSpan2PeriodSpanThe second PeriodSpan operand.
Returns:false if its operands are equal; otherwise, true.
The "less than" relational operator (<) returns true if the first operand is less than the second, false otherwise.
public static bool operator <(PeriodSpan periodSpan1, PeriodSpan periodSpan2)
The first PeriodSpan operand.
periodSpan2PeriodSpanThe second PeriodSpan operand.
Returns:true if the first operand is less than the second; otherwise, false.
The equality operator (==) returns true if its operands refer to the same PeriodSpan object, false otherwise.
public static bool operator ==(PeriodSpan periodSpan1, PeriodSpan periodSpan2)
The first PeriodSpan operand.
periodSpan2PeriodSpanThe second PeriodSpan operand.
Returns:true if its operands refer to the same PeriodSpan object; otherwise, false.
The "greater than" relational operator (>) returns true if the first operand is greater than the second, false otherwise.
public static bool operator >(PeriodSpan periodSpan1, PeriodSpan periodSpan2)
The first PeriodSpan operand.
periodSpan2PeriodSpanThe second PeriodSpan operand.
Returns:true if the first operand is greater than the second; otherwise, false.