I have a class with a string property, having both a getter and a setter, that is often so long that the PropertyGrid truncates the string value. How can I force the PropertyGrid to show an ellipsis and then launch a dialog that contains a multiline textbox for easy editing of the property? I know I probably have to set some kind of attribute on the property, but what attribute and how? Does my dialog have to implement some special designer interface?
Update: This is probably the answer to my question, but I could not find it by searching. My question is more general, and its answer can be used to build any type of custom editor.
You need to set an
[Editor(...)]for the property, giving it aUITypeEditorthat does the edit; like so (with your own editor…)You might be ablt to track down an existing Editor by looking at existing properties that behave like you want.