Back to Devexpress

FixedTimeScale Class

wpf-devexpress-dot-xpf-dot-scheduling-cb10de54.md

latest4.0 KB
Original Source

FixedTimeScale Class

A time scale in the Timeline view whose time cell value is set to a custom fixed interval.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public class FixedTimeScale :
    TimeScaleBase
vb
Public Class FixedTimeScale
    Inherits TimeScaleBase

Remarks

To create a custom time scale in the Timeline View, instantiate the FixedTimeScale class, specify its time cell value using the FixedTimeScale.Scale property and a text to display using the TimeScaleBase.Caption property. Add a custom time scale to the TimelineView.TimeScales collection.

The following example demonstrates how to specify a custom set of time scales for the Timeline View :

xaml
<dxsch:TimelineView x:Name="timelineView" IntervalCount="8">
    <dxsch:TimelineView.TimeScales>
        <dxsch:TimeScaleWeek x:Name="scaleWeek" IsEnabled="False"/>
        <dxsch:TimeScaleWorkDay x:Name="scaleWorkDay" IsEnabled="True"/>
        <dxsch:TimeScaleWorkHour x:Name="scaleWorkHour" IsEnabled="True"/>
        <dxsch:FixedTimeScale x:Name="scaleFixedTime" Caption ="30 minutes" Scale="00:30:00" IsEnabled="True" ShowHeaders="False"/>
    </dxsch:TimelineView.TimeScales>
</dxsch:TimelineView>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FixedTimeScale class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-scheduler-generate-time-scales-from-view-model-collection/CS/WpfSchedulerTimelineScalesTemplate/MainWindow.xaml#L33

xml
<ContentControl>
    <dxsch:FixedTimeScale Caption="{Binding Caption}" ShowHeaders="{Binding ShowHeaders}" IsEnabled="{Binding IsEnabled}" Scale="{Binding Scale}"/>
</ContentControl>

Implements

ITimeScale

Inheritance

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement DevExpress.Xpf.Scheduling.Internal.SchedulerFrameworkComponent TimeScaleBase FixedTimeScale

See Also

FixedTimeScale Members

TimeScales

Timeline View

DevExpress.Xpf.Scheduling Namespace