Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

PropertyEditor.DisplayFormat Property

Specifies the pattern for formatting values of the current Property Editor.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v20.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public string DisplayFormat { get; set; }

Property Value

Type Description
String

A string representing the format pattern.

Remarks

By default, this property returns the IModelCommonMemberViewItem.DisplayFormat property value of the Application Model‘s node. This node can be accessed using the PropertyEditor.Model property as shown in the Apply the Display Format to an Integer Property Value article.

The DisplayFormat attribute specifies the property’s display format pattern. For instance, if the integer property’s format pattern is “ID:{0}”, the property will be displayed with the “ID:” prefix. The “{0}” placeholder specifies the position of the property value within the displayed text. The complete syntax of the placeholder is “{0[,alignment][:formatString]}”. The optional alignment component is a signed integer indicating the preferred formatted field width. The formatted data in the field is right-aligned if alignment is positive, and left-aligned if alignment is negative. The optional formatString component consists of Format Specifiers.

If you implement a custom Property Editor, consider changing the control’s behavior in accordance with the DisplayFormat property value.

See Also