DateTimeOptions.Format Property
Gets or sets a value that specifies the form of date-time values’ representation.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v24.2.dll
NuGet Package: DevExpress.Wpf.Charts
#Declaration
public DateTimeFormat Format { get; set; }
#Property Value
Type | Description |
---|---|
Date |
A Date |
Available values:
Name | Description |
---|---|
Short |
Displays a date using the short-date format specified in your computer’s regional settings. |
Long |
Displays a date using the long-date format specified in your computer’s regional settings. |
Short |
Displays a time using the short-time format specified in your computer’s regional settings. |
Long |
Displays a time using the long-time format specified in your computer’s regional settings. |
General | Displays a date and time, using the general date-time settings determined by your computer’s regional settings. |
Month |
Displays a date as a month name and day number, using your computer’s regional settings (e. |
Month |
Displays a date as a month name and year number, using your computer’s regional settings (e. |
Quarter |
Displays a date as a quarter value and year number using your computer’s regional settings (e. Note that you can apply formatting to the quarter’s value. To do this, set the q - Changes format to Roman numerals (e. qq - Changes format to Roman numerals with the Q prefix (e. Q - Changes format to Arabic numerals (e. QQ - Changes format to Arabic numerals with the Q prefix (e. |
Custom | The format string specified by the Date |
#Property Paths
You can access this nested property as listed below:
Object Type | Path to Format |
---|---|
Point |
|
Point |
|
#Remarks
Use the Format property, to define the appropriate format for date-time values representation in the axis labels, series point labels or in the legend.
If the Format property is set to DateTimeFormat.Custom, the DateTimeOptions.FormatString property is used to determine the date-time format.
#Example
The following example demonstrates how to modify the DateTimeOptions.Format
property value in XAML.
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D>
<dxc:AxisX2D.Label>
<dxc:AxisLabel TextPattern="{}{A:MMMM d}"/>
</dxc:AxisX2D.Label>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>