Class PeriodSpan
ViewModel that represents a time period.
Inherited Members
Namespace: Telerik.Windows.Controls.TimeBar
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public class PeriodSpan : ViewModelBase, INotifyPropertyChanged, IDisposable, IComparable, IComparable<DateTime>, IComparable<PeriodSpan>, IPeriodSpan
Constructors
PeriodSpan(DateTime, TimeSpan)
Initializes a new instance of the PeriodSpan class.
Declaration
public PeriodSpan(DateTime start, TimeSpan span)
Parameters
System.DateTime
start
The start of the time interval. |
System.TimeSpan
span
The System.TimeSpan of the time period. |
Properties
EndDate
Gets the end of the time period.
Declaration
public DateTime EndDate { get; }
Property Value
System.DateTime
The end of the time period. |
Implements
Interval
Gets the span of the time period.
Declaration
public TimeSpan Interval { get; }
Property Value
System.TimeSpan
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
System.String
The label that represents the time period. |
StartDate
Gets the start of the time period.
Declaration
public DateTime StartDate { get; }
Property Value
System.DateTime
The start of the time period. |
Implements
Ticks
Gets the span of the time period in System.TimeSpan.Ticks.
Declaration
public long Ticks { get; }
Property Value
System.Int64
The span of the time period in System.TimeSpan.Ticks. |
Methods
CompareTo(DateTime)
Compares the current instance with another System.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
System.DateTime
other
A System.DateTime object to compare with this instance. |
Returns
System.Int32
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 |
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
System.Object
obj
An object to compare with this instance. |
Returns
System.Int32
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 |
Implements
Exceptions
System.ArgumentException
|
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
PeriodSpan
other
A PeriodSpan object to compare with this instance. |
Returns
System.Int32
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 |
Implements
Equals(Object)
Determines whether the specified System.Object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
The System.Object to compare with this instance. |
Returns
System.Boolean
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
System.Int32
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Operators
Equality(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
PeriodSpan
periodSpan1
The first PeriodSpan operand. |
PeriodSpan
periodSpan2
The second PeriodSpan operand. |
Returns
System.Boolean
|
GreaterThan(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
PeriodSpan
periodSpan1
The first PeriodSpan operand. |
PeriodSpan
periodSpan2
The second PeriodSpan operand. |
Returns
System.Boolean
|
Inequality(PeriodSpan, PeriodSpan)
The inequality operator (!=) returns false
if its operands are equal, true
otherwise.
Declaration
public static bool operator !=(PeriodSpan periodSpan1, PeriodSpan periodSpan2)
Parameters
PeriodSpan
periodSpan1
The first PeriodSpan operand. |
PeriodSpan
periodSpan2
The second PeriodSpan operand. |
Returns
System.Boolean
|
LessThan(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
PeriodSpan
periodSpan1
The first PeriodSpan operand. |
PeriodSpan
periodSpan2
The second PeriodSpan operand. |
Returns
System.Boolean
|