PropertyGridControl DevExpress隐藏一些属性

时间:2016-04-11 13:55:48

标签: devexpress propertygrid

如何在不使用PropertyGridControl的情况下隐藏[Browsable(false)]中某些父类的虚拟属性?我不能使用它,因为我无法覆盖不是虚拟属性。

1 个答案:

答案 0 :(得分:0)

如果您无法覆盖该属性,则可以使用new修饰符 这是一个例子:

public class SomeChildClass : SomeParentClass
{
    [Browsable(false)]
    new public TypeOfProperty SomeProperty
    {
        get { return base.SomeProperty; }
        set { base.SomeProperty = value; }
    }
}