Back to Devexpress

DurationEdit Class

windowsforms-devexpress-dot-xtrascheduler-dot-ui-a12f13b9.md

latest3.5 KB
Original Source

DurationEdit Class

The combo box control used to specify time intervals (durations).

Namespace : DevExpress.XtraScheduler.UI

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
[ComVisible(false)]
[DXLicenseWinForms]
public class DurationEdit :
    ComboBoxEdit
vb
<ComVisible(False)>
<DXLicenseWinForms>
Public Class DurationEdit
    Inherits ComboBoxEdit

Remarks

The DurationEdit control provides the capability to choose a duration from a list of predefined intervals from 5 minutes to 2 days, or enter a custom interval. The control parses the entered string using HumanReadableTimeSpanHelper.ParseString method. You can enter a string composed of figures and predefined words, and it will be properly interpreted and converted to the TimeSpan value.

The following words are recognized by default:

  • Minutes: “m”, “min”, “minute” “minutes”
  • Hours: “h”, “hour”, “hours”
  • Days: “d”, “day”, “days”
  • Weeks: “w”, “week”, “weeks”
  • Month: “month”, “months”
  • Year: “year”, “years”

A list of accepted words signifying names of time intervals and their abbreviations is contained within localized resources. It is represented by the SchedulerStringId enumeration values - those starting with “Abbr..”, e.g. SchedulerStringId.Abbr_Minute, SchedulerStringId.Abbr_Minutes, SchedulerStringId.Abbr_HoursShort, SchedulerStringId.Abbr_Hour and so on.

Use the DurationEdit.LoadDefaults method to set the upper limit on editor values loaded by default.

The DurationEdit.Duration property reflects the time interval selected by the user.

The common appearance of the control is shown below.

Implements

IXtraResizableControl

Inheritance

Show 14 items

Object MarshalByRefObject Component Control DevExpress.XtraEditors.XtraControl ControlBase BaseControl BaseEdit TextEdit ButtonEdit PopupBaseEdit PopupBaseAutoSearchEdit ComboBoxEdit DurationEdit

See Also

DurationEdit Members

DevExpress.XtraScheduler.UI Namespace