开发者

What is PropertyDescriptor.GetEditor() useful for?

I just discovered the PropertyDescriptor class and I was wondering what is its method GetEditor() used for. The documentation doesn't say much about it.

So, what kind of editor does it return? How would you use it? Is it actually usefu开发者_JAVA技巧l?


It is used primarily for the PropertyGrid control, or third party versions. It returns a value specified on the property or type by the EditorAttribute.

It actually returns an instance of the type specified by EditorAttribute.

For the WinForms PropertyGrid, the editors derive from UITypeEditor. Third-party property grids can have their own base type though.

In general, you'd create editors for your types/properties and won't need to call GetEditor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜