Back to Devexpress

TimeRuler.UseClientTimeZone Property

corelibraries-devexpress-dot-xtrascheduler-dot-timeruler-e46ba69d.md

latest3.6 KB
Original Source

TimeRuler.UseClientTimeZone Property

Gets or sets whether a particular TimeRuler always uses the ClientTimeZoneId setting.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.Core.Desktop.dll

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
[DefaultValue(true)]
public bool UseClientTimeZone { get; set; }
vb
<DefaultValue(True)>
Public Property UseClientTimeZone As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true , if a TimeRuler uses ClientTimeZoneId setting; otherwise, false.

|

Remarks

The Time Ruler element with the UseClientTimeZone property set to true uses the client time zone specified by the SchedulerOptionsBehaviorBase.ClientTimeZoneId property. By default, a client time zone is the same as the time zone of the host.

The time scale of the TimeRuler that uses the client time zone always starts at 00:00 AM. Time scales of time rulers with different time zone settings are shifted relative to the time scale of the time ruler that belongs to the client time zone.

Note

When the TimeRuler.TimeZoneId property of the TimeRuler is modified, the UseClientTimeZone value becomes false.

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

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.

winforms-scheduler-formatting-services/CS/FormattingServicesExample/Form1.cs#L94

csharp
public override string GetHalfDayHourFormat(TimeRuler ruler) {
    return ruler.UseClientTimeZone ? "hh:mm" : "HH:mm";
}

winforms-scheduler-formatting-services/VB/FormattingServicesExample/Form1.vb#L96

vb
Public Overrides Function GetHalfDayHourFormat(ByVal ruler As TimeRuler) As String
    Return If(ruler.UseClientTimeZone, "hh:mm", "HH:mm")
End Function

See Also

ClientTimeZoneId

TimeRuler Class

TimeRuler Members

DevExpress.XtraScheduler Namespace