ClassPeriodSpan
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
PeriodSpan(DateTime, TimeSpan)
Initializes a new instance of the PeriodSpan class.
Properties
EndDate
Gets the end of the time period.
Declaration
public DateTime EndDate { get; }
Property Value
The end of the time period.
Implements
Interval
Gets the span of the time period.
Declaration
public TimeSpan Interval { get; }
Property Value
The span of the time period.
Implements
Label
Gets or sets the label that represents the time period.
Declaration
public string Label { get; set; }
Property Value
The label that represents the time period.
StartDate
Gets the start of the time period.
Declaration
public DateTime StartDate { get; }
Property Value
The start of the time period.
Implements
Methods
CompareTo(DateTime)
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.
Declaration
public int CompareTo(DateTime other)
Parameters
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
CompareTo(PeriodSpan)
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.
Declaration
public int CompareTo(PeriodSpan other)
Parameters
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
CompareTo(object)
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.
Declaration
public int CompareTo(object obj)
Parameters
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.
Exceptions
obj is not the same type as this instance.
Implements
Equals(object)
Determines whether the specified object is equal to this instance.
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides
Operators
operator !=(PeriodSpan, PeriodSpan)
The inequality operator (!=) returns false if its operands are equal, true otherwise.
Declaration
public static bool operator !=(PeriodSpan periodSpan1, PeriodSpan periodSpan2)
Parameters
periodSpan1
The first PeriodSpan operand.
periodSpan2
The second PeriodSpan operand.
Returns
false if its operands are equal; otherwise, true.
operator <(PeriodSpan, PeriodSpan)
The "less than" relational operator (<) returns true if the first operand is less than the second, false otherwise.
Declaration
public static bool operator <(PeriodSpan periodSpan1, PeriodSpan periodSpan2)
Parameters
periodSpan1
The first PeriodSpan operand.
periodSpan2
The second PeriodSpan operand.
Returns
true if the first operand is less than the second; otherwise, false.
operator ==(PeriodSpan, PeriodSpan)
The equality operator (==) returns true if its operands refer to the same PeriodSpan object, false otherwise.
Declaration
public static bool operator ==(PeriodSpan periodSpan1, PeriodSpan periodSpan2)
Parameters
periodSpan1
The first PeriodSpan operand.
periodSpan2
The second PeriodSpan operand.
Returns
true if its operands refer to the same PeriodSpan object; otherwise, false.
operator >(PeriodSpan, PeriodSpan)
The "greater than" relational operator (>) returns true if the first operand is greater than the second, false otherwise.
Declaration
public static bool operator >(PeriodSpan periodSpan1, PeriodSpan periodSpan2)
Parameters
periodSpan1
The first PeriodSpan operand.
periodSpan2
The second PeriodSpan operand.
Returns
true if the first operand is greater than the second; otherwise, false.