Enumeration Properties
- 3 minutes to read
In XAF, a combo box with text entries displays enumeration properties. Use XafDisplayNameAttribute to associate custom text strings with enumeration values. In WinForms and ASP.NET Web Forms applications, you can also apply ImageNameAttribute to add image entries. Additionally, you can display an integer property as an enumeration.
Refer to the following topics for more information on enumeration properties related to your ORM:
WinForms
Each WinForms Property Editor comes with a control that displays a corresponding property in a Detail View and a repository item that displays this property in a List Editor that supports in-place editing.
Property Editor | Control | Repository Item | Description |
---|---|---|---|
EnumPropertyEditor |
|
| Used for enumeration type properties. Press Alt + Down Arrow to expand the |
EnumIntPropertyEditor<TEnum> |
|
| Used to display integer properties as enumerations. Refer to the following topic for more information: How to: Display an Integer Property as an Enumeration. |
ASP.NET Web Forms
Each ASP.NET Web Forms Property Editor includes controls that display a property in a Detail View in View and Edit mode.
Property Editor | Description |
---|---|
ASPxEnumPropertyEditor | Used for enumeration type properties. The View mode uses the |
ASPxEnumIntPropertyEditor<TEnum> | The base class for Property Editors used to display integer properties as enumerations. View mode uses the |
ASP.NET Core Blazor
In ASP.NET Core Blazor, the ViewItem.Control
property returns an IComponentContentHolder
descendant. This descendant has the ComponentModel
property, which returns an IComponentModel
descendant that wraps properties and events of a Blazor Editor.
Property Editor | IComponentContentHolder descendant | IComponentModel descendant |
---|---|---|
EnumPropertyEditor |
|