locked
Custom Controls: ComponentModel.Editor RRS feed

  • Question

  • User871756521 posted

    the question is specific to ComponentModel.Editor part, what's the class name that will allow me to specify which editor will allow me to edit a property with the "Style Builder" in VS2005?

    not the component Builder where it gives limited options the Style Builder is the one in the image attached

     http://lh6.ggpht.com/aous77/SE57M8IsuXI/AAAAAAAAA2s/TNlj3mylvOw/sshot-1.jpg

    1    <ComponentModel.Editor(GetType(System.Web.UI.Design.???????????????????), GetType(System.Drawing.Design.UITypeEditor)), _
    2 ComponentModel.DisplayName("MyStyle")> _
    3 Public Property MyStyle() As CssStyleCollection
    4 Get ...
    5 Set ...
    6 End Property
     
    Tuesday, June 10, 2008 9:17 AM

Answers

  • User-1691609705 posted

    Hi,

    can't view the image you have provided, but I know the one you refer to....the Style Builder Dialog Box.  I may be wrong here but I don't think you have acces to it.  And for the life of me, I can't find the namespace in which it may be contained.

    The closest is: " <Editor(GetType(StyleCollectionEditor), GetType(UITypeEditor))>" which you can use for a property of type CssStyleCollection but this will allow you to set the style for an object, such as a server control.  That being said, I think the Style Builder you refer to is applicable to HTML block or inline elements such as DIV and SPAN elements, that is why in design, when you click on a div or span element, you see the style in the property grid.

    I haven't read the article fully, but check out: http://www.asp.net/Downloads/sandbox/css-properties-window/ for a possible soultion, or at least an idea.

    If I am wrong, and you do find a work-around, please let me know.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 10, 2008 2:27 PM