Last post Jul 01, 2010 05:07 PM by dr.zoop
Jun 21, 2010 06:05 PM|Dr.Zoop|LINK
I have literally spent all day trying to solve this; finally got desperate enough to post on forums:
I have added a Description and Editor attributes to my text property. But they never appear in the designer.
Description("This doesn't appear."),
Editor("System.ComponentModel.Design.MultilineStringEditor,System.Design, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor)) //This doesn't work either.
public string Text
Jun 23, 2010 10:41 AM|Dr.Zoop|LINK
Anyone? Without being able to have multi-line text editors in Visual Studio's properties... it'll make this project dramatically more difficult. It'll also mostly preclude non-programmers from working on the project, and that is simply not acceptable.
I could get by without the Description attribute working, but, it's really be shame.
If it wasn't clear: when I click on my Text property on my custom control within Properties, no description appears. It's as if the Description attribute isn't even there. Same with the editor attribute--no drop down editor.
What information do you guys need to know for me to help you... help me?
Jun 24, 2010 02:34 AM|Qin Dian Tang - MSFT|LINK
Nothing special, just like:
[Description("This doesn't appear.")]
[Editor("System.Web.UI.Design.UrlEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))]
Jun 24, 2010 10:41 AM|Dr.Zoop|LINK
Thanks for your response; unfortunately, I had already tried splitting them up into multiple s, as you demonstrated, and with commas, as I showed in my original post. I have also tried it with Description being the only attribute on the property. It
is clearly being completely ignored. I have also tried DescriptionAttribute instead of just Description.
Here is a picture comparing my custom control on the left to a generic TextBox control on the right. It is the exact same result with both ways of doing the attribute, multiple s or single s with commas.
Jun 24, 2010 11:33 PM|Qin Dian Tang - MSFT|LINK
It should be ok. Maybe you can close the project and restart it again to see if it works. Or you can try to set 'Browsable' and 'EditorBrowsable'. Just try.
Jul 01, 2010 05:07 PM|Dr.Zoop|LINK
I've done what you asked... unfortunately same results. :-( Other suggestions?
[Browsable(true)] //no effect
[EditorBrowsable(EditorBrowsableState.Always)] //no effect
[Description("WORK @#*% it")] //no effect
[Editor("System.ComponentModel.Design.MultilineStringEditor,System.Design, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] //no effect
public string Text