Back to Devexpress

CaptionHelper.GetMemberCaption(Type, String) Method

expressappframework-devexpress-dot-expressapp-dot-utils-dot-captionhelper-dot-getmembercaption-x28-system-dot-type-system-dot-string-x29.md

latest2.5 KB
Original Source

CaptionHelper.GetMemberCaption(Type, String) Method

Returns the display caption corresponding to a business class‘ property.

Namespace : DevExpress.ExpressApp.Utils

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public static string GetMemberCaption(
    Type objectType,
    string memberName
)
vb
Public Shared Function GetMemberCaption(
    objectType As Type,
    memberName As String
) As String

Parameters

NameTypeDescription
objectTypeType

A Type object representing the type of the business class that declares the required property.

| | memberName | String |

A string specifying the name of the required property.

|

Returns

TypeDescription
String

A string representing the display caption corresponding to the specified property.

|

Remarks

For properties of business classes used in an XAF application, this method returns the IModelCommonMemberViewItem.Caption property value of the corresponding Member node. For all the other properties, the GetMemberCaption method returns the first part of the specified property name.

To see an example of using this method, refer to the Add an Action with Option Selection tutorial lesson.

See Also

CaptionHelper Class

CaptionHelper Members

DevExpress.ExpressApp.Utils Namespace