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
<ComponentModel.Editor(GetType(System.Web.UI.Design.???????????????????), GetType(System.Drawing.Design.UITypeEditor)), _
ComponentModel.DisplayName("MyStyle")> _
Public Property MyStyle() As CssStyleCollection
Get ...
Set ...
End Property
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.
aousabbas
Member
20 Points
5 Posts
Custom Controls: ComponentModel.Editor
Jun 10, 2008 01:17 PM|LINK
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
<ComponentModel.Editor(GetType(System.Web.UI.Design.???????????????????), GetType(System.Drawing.Design.UITypeEditor)), _ ComponentModel.DisplayName("MyStyle")> _ Public Property MyStyle() As CssStyleCollection Get ... Set ... End Propertyeditor UITypeEditor Custom Controls ComponentModel
shalan99
Member
195 Points
159 Posts
Re: Custom Controls: ComponentModel.Editor
Jun 10, 2008 06:27 PM|LINK
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.