Back to Devexpress

CaptionsForBoolValuesAttribute Class

expressappframework-devexpress-dot-persistent-dot-base-3fc480c6.md

latest2.8 KB
Original Source

CaptionsForBoolValuesAttribute Class

Applied to Boolean business class properties. Specifies captions used to display the target property’s values.

Namespace : DevExpress.Persistent.Base

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class CaptionsForBoolValuesAttribute :
    ModelExportedValuesAttribute
vb
<AttributeUsage(AttributeTargets.Property Or AttributeTargets.Field, Inherited:=True, AllowMultiple:=False)>
Public Class CaptionsForBoolValuesAttribute
    Inherits ModelExportedValuesAttribute

Remarks

By default, Boolean properties are represented in a UI via a check box:

When the CaptionsForBoolValuesAttribute is applied to a property, it is displayed via a combo box containing the specified captions:

The attribute’s parameter values are assigned to the IModelCommonMemberViewItem.CaptionForFalse and IModelCommonMemberViewItem.CaptionForTrue properties of the Application Model’s BOModel | <Class> | OwnMembers | <Member> node. Additionally, these attribute values are set for the same properties of the Views | <ListView> | Columns | <Column> and Views | <DetailView> | Items | <PropertyEditor> nodes. You can can set other values to these properties, in the appropriate node.

To add images to the combo box, you can apply the ImagesForBoolValuesAttribute:

Inheritance

Object Attribute DevExpress.Persistent.Base.ModelExportedValuesAttribute CaptionsForBoolValuesAttribute

See Also

CaptionsForBoolValuesAttribute Members

DevExpress.Persistent.Base Namespace