Skip to main content
A newer version of this page is available. .
All docs
V22.2

DateTimeMaskOptions Class

Contains settings specific to date-time masks.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v22.2.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public class DateTimeMaskOptions :
    DependencyObject

Remarks

Increment Neighboring Segments

The ChangeNextPartOnCycleValueChange property specifies whether a neighboring segment value should automatically increase or decrease when a user spins through values of one mask segment with editor buttons or arrow keys and this value passes the minimum or maximum threshold.

Example

An editor has the “HH:mm” (hours and minutes) mask and the current editor value is “00:59”. If a user spins the minute segment up, the editor value becomes “00:00” if this property is disabled, or “01:00” when it is enabled. If a user decreases the minute segment value in an editor with a value of “01:00”, the resulting value is either “01:59” or “00:59” - based on the setting.

The following code sample enables the ChangeNextPartOnCycleValueChange property:

<Window ...
  xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
  <Grid>
    <dxe:DateEdit dxe:DateTimeMaskOptions.ChangeNextPartOnCycleValueChange="True"/>
  </Grid>
</Window>

DataEditors - ChangeNextPartOnCycleValueChange

Change Date Time Kind

The DateTimeKind attached property allows you to explicitly set the DateTime.Kind property (UTC, Local time, or neither) of a DateTime value (returned by the editor’s EditValue property).

<dxe:TextEdit MaskType="DateTime" Mask="d" dxe:DateTimeMaskOptions.DateTimeKind="Utc"/>

<dxe:DateEdit dxe:DateTimeMaskOptions.DateTimeKind="Local"/>

Inheritance

See Also