Drew's Blog

The Joys of Technology Explored

Question For the VSIP Gurus Out There

Scenario

Ok, I'm writing an add-in which extends solutions with custom properties. This add-in is written in C#. I've created the extender provider, I'm registering it for the solution object, the properties show up as expected under the properties window in the IDE and all is well. However, for one of these properties I want to provide a custom editor. I've applied the EditorAttribute to my property, but it just seems like the IDE doesn't respect it. Strange thing is, I've applied DescriptionAttribute, TypeConverterAttribute, etc. on all properties and the IDE respects those, so it seems to be a special case related to EditorAttribute.

So The Question Is

What's the trick to get a custom editor to be used for an extended property such that the properties window shows the ellipses (...) box and my custom editor gets displayed when it's clicked?

Posted: Dec 12 2003, 06:45 PM by drub0y | with 5 comment(s)
Filed under:

Comments

Andres Aguiar said:

Is the assembly with the custom editor the same as the managed add-in? If not, perhaps it's not finding the assembly... is it in the PrivateAssemblies folder?
# December 13, 2003 6:30 AM

Drew Marsh said:

Andres,

Thanks for the response. The answer is "yes", the editor is in the same assembly as the add-in. I just don't know why the IDE isn't respecting it. It's so frustrating. :\
# December 13, 2003 1:08 PM

joerg said:

try to declare the editor in the Attribute as string, not type.
# January 30, 2004 7:37 AM

Stuart Dawson said:

Hi Drew

Did you ever find a solution to this?

I have the same issue and I'm pulling my hair out!

# August 20, 2008 4:47 AM

Steve S said:

Imports System.ComponentModel.EditorAttribute

Imports System.Drawing.Design

       Private _MyPicture As String

       <EditorAttribute(GetType(System.Web.UI.Design.UrlEditor), GetType(UITypeEditor))> _

        Public Property MyPicURL() As String

           Get

               Return _MyPicture

           End Get

           Set(ByVal value As String)

               _MyPicture = value

           End Set

       End Property

Or the moral equivalent for c#

# January 16, 2009 7:05 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)