Properties
When setting up the RadTimeBar you should keep in mind that the Start Time properties should always be set before the End Time ones.
The following example shows the required precedence of the properties:
RadTimeBar Properties Precedence
private void SetTimeBarProperties()
{
this.timeBar.PeriodStart = new System.DateTime(2023, 1, 1);
this.timeBar.PeriodEnd = new System.DateTime(2023, 12, 31);
this.timeBar.VisiblePeriodStart = new System.DateTime(2023, 2, 1);
this.timeBar.VisiblePeriodEnd = new System.DateTime(2023, 4, 1);
this.timeBar.SelectionStart = new System.DateTime(2023, 3, 1);
this.timeBar.SelectionEnd = new System.DateTime(2023, 3, 10);
}
Key Properties
-
PeriodStart
—Gets or sets the timebar's start date. -
PeriodEnd
—Gets or sets the timebar's end date. -
VisiblePeriodStart
—Gets or sets the currently visible start date. -
VisiblePeriodEnd
—Gets or sets the currently visible end date. -
Intervals
—Determines the displayed time intervals. The supported intevals are: Century, Decade, Year, Quarter, Month, Week, Day, Hour, Minute, Second, Millisecond.
Setting the RadTimeBar Intervals
<telerik:RadTimeBar.Intervals>
<telerik:YearInterval/>
<telerik:MonthInterval/>
<telerik:WeekInterval/>
<telerik:DayInterval/>
</telerik:RadTimeBar.Intervals>
-
SelectionStart
andSelectionEnd
—These properties determine the beginning of the selected range in the TimeBar control. -
ActualSelectionStart
andActualSelectionEnd
—When the user is dragging one of the selection thumbs, the SelectionStart and SelectionEnd properties are updated once the user releases the selection thumb. On the other hand, the ActualSelectionStart and ActualSelectionEnd properties are updated while the selection thumbs are moving. -
IsSnapToIntervalEnabled
—This turns on the snapping functionality, which will restrict the moving of the selection thumb, so that it will snap to the items' lines. -
MinSelectionRange
andMaxSelectionRange
—These properties define the selection range interval. You won't be able to select an interval lower than the MinSelectionRange and higher than MaxSelectionRange. -
IntervalSpans
: This property can be set from each Interval except Decade and Quarter. It is used to group the given interval items together. -
CurrentItemInterval
andCurrentGroupInterval
—These properties can be used in code-behind to take the current item respectively group interval span set. -
MinZoomRange
andMaxZoomRange
—These properties set the minimum and maximum range that the TimeBar can be zoomed.