Class
PeriodSpan

ViewModel that represents a time period.

Definition

Namespace:Telerik.Windows.Controls.TimeBar

Assembly:Telerik.Windows.Controls.DataVisualization.dll

Syntax:

cs-api-definition
public class PeriodSpan : ViewModelBase, INotifyPropertyChanged, IDisposable, IComparable, IComparable<DateTime>, IComparable<PeriodSpan>, IPeriodSpan

Inheritance: objectViewModelBasePeriodSpan

Implements: IComparableIComparable<DateTime>IComparable<PeriodSpan>IDisposableINotifyPropertyChangedIPeriodSpan

Inherited Members ViewModelBase.VerifyPropertyName(string)ViewModelBase.InvokeOnUIThread(Action)ViewModelBase.Dispose()ViewModelBase.RaisePropertyChanged(string)ViewModelBase.OnPropertyChanged(string)ViewModelBase.OnPropertyChanged<T>(Expression<Func<T>>)ViewModelBase.Dispose(bool)ViewModelBase.PropertyChanged

Constructors

PeriodSpan(DateTime, TimeSpan)

Initializes a new instance of the PeriodSpan class.

Declaration

cs-api-definition
public PeriodSpan(DateTime start, TimeSpan span)

Parameters

start

DateTime

The start of the time interval.

span

TimeSpan

The TimeSpan of the time period.

Properties

EndDate

Gets the end of the time period.

Declaration

cs-api-definition
public DateTime EndDate { get; }

Property Value

DateTime

The end of the time period.

Implements IPeriodSpan.EndDate

Interval

Gets the span of the time period.

Declaration

cs-api-definition
public TimeSpan Interval { get; }

Property Value

TimeSpan

The span of the time period.

Implements IPeriodSpan.Interval

Label

Gets or sets the label that represents the time period.

Declaration

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

Property Value

string

The label that represents the time period.

StartDate

Gets the start of the time period.

Declaration

cs-api-definition
public DateTime StartDate { get; }

Property Value

DateTime

The start of the time period.

Implements IPeriodSpan.StartDate

Ticks

Gets the span of the time period in Ticks.

Declaration

cs-api-definition
public long Ticks { get; }

Property Value

long

The span of the time period in Ticks.

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

cs-api-definition
public int CompareTo(DateTime other)

Parameters

other

DateTime

A DateTime object to compare with this instance.

Returns

int

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 IComparable<DateTime>.CompareTo(DateTime)

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

cs-api-definition
public int CompareTo(PeriodSpan other)

Parameters

other

PeriodSpan

A PeriodSpan object to compare with this instance.

Returns

int

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 IComparable<PeriodSpan>.CompareTo(PeriodSpan)

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

cs-api-definition
public int CompareTo(object obj)

Parameters

obj

object

An object to compare with this instance.

Returns

int

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

ArgumentException

obj is not the same type as this instance.

Implements IComparable.CompareTo(object)

Equals(object)

Determines whether the specified object is equal to this instance.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

Overrides object.Equals(object)

GetHashCode()

Returns a hash code for this instance.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides object.GetHashCode()

Operators

operator !=(PeriodSpan, PeriodSpan)

The inequality operator (!=) returns false if its operands are equal, true otherwise.

Declaration

cs-api-definition
public static bool operator !=(PeriodSpan periodSpan1, PeriodSpan periodSpan2)

Parameters

periodSpan1

PeriodSpan

The first PeriodSpan operand.

periodSpan2

PeriodSpan

The second PeriodSpan operand.

Returns

bool

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

cs-api-definition
public static bool operator <(PeriodSpan periodSpan1, PeriodSpan periodSpan2)

Parameters

periodSpan1

PeriodSpan

The first PeriodSpan operand.

periodSpan2

PeriodSpan

The second PeriodSpan operand.

Returns

bool

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

cs-api-definition
public static bool operator ==(PeriodSpan periodSpan1, PeriodSpan periodSpan2)

Parameters

periodSpan1

PeriodSpan

The first PeriodSpan operand.

periodSpan2

PeriodSpan

The second PeriodSpan operand.

Returns

bool

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

cs-api-definition
public static bool operator >(PeriodSpan periodSpan1, PeriodSpan periodSpan2)

Parameters

periodSpan1

PeriodSpan

The first PeriodSpan operand.

periodSpan2

PeriodSpan

The second PeriodSpan operand.

Returns

bool

true if the first operand is greater than the second; otherwise, false.