Hi Natty and thanx for your reply.
Firstly I should state that I solved my problem and your answer sort of help
me.
However I might have been a little sloppy when I descibed my problem.. So to
help anyone else sitting with a simulare problem..
My Designer class for my control-class do (and did at the time of my first
post) inherit from ReadwriteControlDesigner. And the 'drag-drop'
functionality do/did work even then.
Furthermore I wrongly wrote I wanted my control to look something like this:
"<asp:mycontrol runat=server
style="ms_positioning=gridlayout">....</asp:mycontrol>"
When I actually whanted it to look like this:
<asp:mycontrol runat=server
ms_positioning='gridlayout'>....</asp:mycontrol>
My missleding question leed you to belive that I needed to reach css-style
properties, when I only needed to reach "ordinary" properies.
The solution to my problem where much easier than I could imagine..
To get the designer to set properties on the initial drop on the webform..
one can easily add these proprties by adding them to the ToolboxData()
statement (as following):
ToolboxData("<{0}:mycontrol ms_positioning='GridLayout'
someotherpropertie='somevalue' runat=server ></{0}:mycontrol>")
Before I end this post I might add something that consumed much of my
anger..
If you build your control in one project and test in in another, and therby
switch between them when testing,
It can somnetimes be necesary to remove and re-add your control to the
designer, to make the changes take place. Some changes might come through
without the remove/re-add but some might not (so dont do uneceserary
testing, like I did ;-)) remove/re-add your control...
And last, I want to Thank the person who answered an earlier thread I wrote,
where I asked for links on howto enable design-time support. Your links
where wery helpful, thank you! For some reason I havent been able to find my
thread again to answer your post, so hopefully you might browse trough this
one instead. :-)
//Robert
"Natty Gur" <natty@dao2com.com> skrev i meddelandet
news:%23Ost1XPZEHA.136@TK2MSFTNGP11.phx.gbl...
[quoted text, click to view] > Hi,
>
> you need to add System.Web.UI.Design.ReadWriteControlDesigner to your
> control. ReadWriteControlDesigner enables your controller to host other
> controls by drag and drop them. in fact I think that if you use
> PanelDesigner you'll get the behaviour you after. if not you need to
> overload PanelDesigner MapPropertyToStyle method.
>
> HTH
>
> Natty Gur[MVP]
>
> blog :
http://weblogs.asp.net/ngur > Mobile: +972-(0)52-8888377
>
>
> *** Sent via Devdex
http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!