B
Brendan Green
Hi all,
I've been searching around, couldn't find an answer, so decided to post
here. Hopefully someone can help me out!
First of all, I'm using the Beta 2 of Visual Studio 2005.
I've written a custom web control, and it has a property TitleStyle, which I
want to take style information (e.g. "padding-left: 5px;").
Currently, this property is a simple string, and all works well. The
outputted HTML is properly formed.
However, I would like to enhance this, and give the user access to the Style
Builder.
The code that I have at the moment looks like this:
private Style m_titleStyle;
[Bindable(true)]
[Editor(typeof(System.Web.UI.Design.WebControls.StyleCollectionEditor),
typeof(System.Web.UI.Design.WebControls.StyleCollectionEditor))]
public Style TitleStyle
{
// getter and setter
}
Now, when ellipsis in the designer Properties, I don't get the Style Builder
dialog, but the Object Collection Editor.
So, either I'm completely wrong, or almost there!
Does anyone know how to set the editor correctly, so that in the designer I
can display the Style Builder?
Thanks in advance,
Brendan.
I've been searching around, couldn't find an answer, so decided to post
here. Hopefully someone can help me out!
First of all, I'm using the Beta 2 of Visual Studio 2005.
I've written a custom web control, and it has a property TitleStyle, which I
want to take style information (e.g. "padding-left: 5px;").
Currently, this property is a simple string, and all works well. The
outputted HTML is properly formed.
However, I would like to enhance this, and give the user access to the Style
Builder.
The code that I have at the moment looks like this:
private Style m_titleStyle;
[Bindable(true)]
[Editor(typeof(System.Web.UI.Design.WebControls.StyleCollectionEditor),
typeof(System.Web.UI.Design.WebControls.StyleCollectionEditor))]
public Style TitleStyle
{
// getter and setter
}
Now, when ellipsis in the designer Properties, I don't get the Style Builder
dialog, but the Object Collection Editor.
So, either I'm completely wrong, or almost there!
Does anyone know how to set the editor correctly, so that in the designer I
can display the Style Builder?
Thanks in advance,
Brendan.