如何显示或PropertyGrid中的动态隐藏属性? [英] How to show or hide properties dynamically in the PropertyGrid?
本文介绍了如何显示或PropertyGrid中的动态隐藏属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是PropertyGrid的配置对象。我需要能够隐藏或显示这取决于其它属性的值一些属性。这可怎么实现的?我知道可浏览属性,但它只能在编译时。
I am using a PropertyGrid for configuring objects. I need to be able to hide or show some properties depending on the values of other properties. How this can be achieved? I know about Browsable attribute, but it only works at a compile time.
推荐答案
看看到的 ICustomTypeDescriptor
接口。
Take a look into the ICustomTypeDescriptor
Interface.
在如何使用它可以在本文中找到进一步的信息:
Further informations on how to use it can be found in this article:
这篇关于如何显示或PropertyGrid中的动态隐藏属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文