.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET 5.0+

ITypeInfo.DefaultMember Property

Returns metadata on the current type’s default member.

Namespace: DevExpress.ExpressApp.DC

Assembly: DevExpress.ExpressApp.v21.2.dll

Declaration

IMemberInfo DefaultMember { get; }

Property Value

Type Description
IMemberInfo

The metadata on the current type’s default member.

Remarks

XAF checks if a business class contains the following properties and sets DefaultMember to the first found property:

  1. The property specified by the class’s DefaultPropertyAttribute or XafDefaultPropertyAttribute.
  2. A property whose name matches or contains one of the DevExpress.ExpressApp.DC.TypeInfo.DefaultPropertyNames values (Name, Title, Subject, Caption, Description, Benennung, Nombre, Nome). These values are arranged in priority order. For example, if a business class has both ObjectName and Description properties, DefaultMember returns ObjectName.
  3. The property specified by the class’s FriendlyKeyPropertyAttribute.
  4. The property specified by the class’s KeyAttribute.

The following behavior is specific to the default members:

  • Lookup Property Editors display default member values.
  • Default members take part in form caption generation.
  • In List Views, reference property columns display values of a referenced object’s default member. The FullTextSearch Action considers these values when it filters objects.
  • List Views display the default member column first.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DefaultMember property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also