Programmatically Hide Field in PropertyGrid

后端 未结 4 689
失恋的感觉
失恋的感觉 2020-12-10 20:21

Using

 _

on the declaration of a class

4条回答
  •  孤城傲影
    2020-12-10 21:12

    if you were hoping for a gridItem.Hide() then, the answer is no. The only way to achieve that in the MS PropertyGrid is to dynamically publish your properties through the GetProperties method of a TypeConverter or custom type descriptor (that implements ICustomTypeDescriptor). I would try first with the TypeConverter (expecially if the property values you want to check are at the same level), there is less coding to do.

提交回复
热议问题