AppearanceAttribute(String) Constructor

Creates a new instance of the AppearanceAttribute class.

Namespace: DevExpress.ExpressApp.ConditionalAppearance

Assembly: DevExpress.ExpressApp.ConditionalAppearance.v18.1.dll

Declaration

public AppearanceAttribute(
    string id
)
Public Sub New(
    id As String
)

Parameters

Type Name Description
String id

A string that is the unique identifier for the appearance rule created using the current attribute instance.

This constructor sets the following attribute properties:

The remaining properties can be specified using the constructor's named parameters.

To learn how to define a rule using the Appearance attribute, refer to the Declare Conditional Appearance Rules in Code topic.

Example

According to the rule demonstrated in the example below, the Category property in List Views will be displayed in Blue font color when its value is "Seafood".

using DevExpress.ExpressApp.ConditionalAppearance;
//...
[Appearance("CategoryColoredInListView", AppearanceItemType = "ViewItem", TargetItems = "Category",
 Criteria = "Category = 'Seafood'", Context = "ListView", FontColor = "Blue", Priority = 1)]
public class Product : BaseObject {
    public Product(Session session) : base(session) { }
    public Category Category {
        //...
    }
}
[DefaultProperty("Name")]
public class Category : BaseObject {
    public Category(Session session) : base(session) {}
    public string Name {
        //...
    }
}

See Also