skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class PeriodSpan

ViewModel that represents a time period.

Inheritance
System.Object
ViewModelBase
PeriodSpan
Inherited Members
ViewModelBase.VerifyPropertyName(String)
ViewModelBase.InvokeOnUIThread(Action)
ViewModelBase.Dispose()
ViewModelBase.RaisePropertyChanged(String)
ViewModelBase.OnPropertyChanged(String)
ViewModelBase.OnPropertyChanged<T>(Expression<Func<T>>)
ViewModelBase.Dispose(Boolean)
ViewModelBase.PropertyChanged
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
IPeriodSpan.EndDate

Interval

Gets the span of the time period.

Declaration
public TimeSpan Interval { get; }
Property Value
System.TimeSpan

The span of the time period.

Implements
IPeriodSpan.Interval

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
IPeriodSpan.StartDate

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 other parameter. Zero This object is equal to other. Greater than zero This object is greater than other.

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 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
System.ArgumentException

obj is not the same type as this instance.

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 other parameter. Zero This object is equal to other. Greater than zero This object is greater than other.

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

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

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.

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

true if its operands refer to the same PeriodSpan object; otherwise, false.

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

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

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

false if its operands are equal; otherwise, true.

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

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

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.