Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

MemberDesignTimeVisibilityAttribute Class

Specifies whether a property or class is visible at design time.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.1.dll


[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field, Inherited = true)]
public sealed class MemberDesignTimeVisibilityAttribute :


The MemberDesignTimeVisibilityAttribute attribute specifies whether a class or property is marked as visible by default. This attribute affects the collection’s behavior while it is bound to a control (see the example).


The following example shows how to mark the Age property as hidden at design time. For this purpose the MemberDesignTimeVisibilityAttribute is used. When binding the xpCollection1 class to the XtraGrid control, grid columns are automatically created for displayable properties. As a result the column for the Age property isn’t created.


using DevExpress.Xpo;
// ...
class SampleTable : XPBaseObject {
    private int id;
    private string name;
    private int age;

    SampleTable(Session session) : base(session) { = "John";
        this.age = 25;

    public int ID {
        get { return id; }
        set { SetPropertyValue<int>(nameof(ID), ref id, value); }
    public string Name {
        get { return name; }
        set { SetPropertyValue<string>(nameof(Name), ref name, value); }
    public int Age {
        get { return age; }
        set { SetPropertyValue<int>(nameof(Age), ref age, value); }


See Also