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 useful?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.