Back to Devexpress

TimePicker Class

wpf-devexpress-dot-xpf-dot-editors-00a37218.md

latest3.7 KB
Original Source

TimePicker Class

A TimePicker control.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
[DXLicenseWpfEditors]
public class TimePicker :
    Control
vb
<DXLicenseWpfEditors>
Public Class TimePicker
    Inherits Control

Remarks

The TimePicker control consists of a clock face and a time edit box.

Use the DateTime property to obtain or specify the TimePicker value. The TimePicker control ignores the date part of the assigned DateTime value.

When the DateTime property value is changed, the DateTimeChanged event occurs.

You can use the MinValue and MaxValue properties to set a range of selectable values.

Use the VisibleMaskParts property to specify which part of time picker mask is visible:

xaml
<dxe:TimePicker VisibleMaskParts="Hours,Minutes" DateTime="15:30:15"/>

Integrate to DateEdit

To show a DateEdit‘s popup with a TimePicker, use the style settings listed below:

DateEdit with TimePicker and Calendar

Pass the DateEditNavigatorWithTimePickerStyleSettings object to the DateEdit ‘s StyleSettings property.

xaml
<dxe:DateEdit Mask="G" MaskUseAsDisplayFormat="True">
    <dxe:DateEdit.StyleSettings>
        <dxe:DateEditNavigatorWithTimePickerStyleSettings/>
    </dxe:DateEdit.StyleSettings>
</dxe:DateEdit>

DateEdit with TimePicker

Pass the DateEditTimePickerStyleSettings object to the DateEdit ‘s StyleSettings property.

xaml
<dxe:DateEdit Mask="T" MaskUseAsDisplayFormat="True">
    <dxe:DateEdit.StyleSettings>
        <dxe:DateEditTimePickerStyleSettings/>
    </dxe:DateEdit.StyleSettings>
</dxe:DateEdit>

Inheritance

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control TimePicker

See Also

TimePicker Members

DevExpress.Xpf.Editors Namespace