Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You might want to take a look at classes that derive from <a href="http://msdn.microsoft.com/en-us/library/system.drawing.design.uitypeeditor.aspx" rel="nofollow noreferrer"><code>UITypeEditor</code></a> (in the <a href="http://msdn.microsoft.com/en-us/library/system.drawing.design.aspx" rel="nofollow noreferrer"><code>System.Drawing.Design</code> namespace</a>). These types will be passed as parameters to the <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.editorattribute.aspx" rel="nofollow noreferrer"><code>EditorAttribute</code></a> (in the <a href="http://msdn.microsoft.com/en-us/library/z82ykwhb.aspx" rel="nofollow noreferrer"><code>System.ComponentModel</code> namespace</a>).</p> <p>You can also look at the metadata for the type to see where the <code>EditorAttribute</code> is applied. However, <strong>do not</strong> use reflection here, as that is not what the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.propertygrid.aspx" rel="nofollow noreferrer"><code>PropertyGrid</code> class</a> uses.</p> <p>Rather use the <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.typedescriptor.aspx" rel="nofollow noreferrer"><code>TypeDescriptor</code> class</a> to get property descriptors for the properties on the type (call the static <a href="http://msdn.microsoft.com/en-us/library/e2k1x8zt.aspx" rel="nofollow noreferrer"><code>GetProperties</code> method</a>). Then, with the <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.propertydescriptor.aspx" rel="nofollow noreferrer"><code>PropertyDescriptor</code></a> instance, call the <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.propertydescriptor.geteditor.aspx" rel="nofollow noreferrer"><code>GetEditor</code> method</a> to get an instance of the editor for that property.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload