Thanks for your responses, but I don't believe your assumptions are correct. You can render absolutely anything you want from GetDesignTimeHtml, and you don't have to render a single thing from the actual control, since the designer overrides it and we're
not actually rendering the control at runtime.
I have determined that the problem is actually related to WebControl.AddAttributesToRender.
This method seems to add css positioning information to the control's main tag that allows it to move around in the designer. However, I don't know where it's getting those values from. ControlStyle is empty. Attributes is empty. There's something tricky
going on in this function.
Phlow
0 Points
7 Posts
Re: Custom control can't be moved from the top left corner in the designer. (.NET 2.0 VC#2005)
Jan 03, 2007 12:12 AM|LINK
Thanks for your responses, but I don't believe your assumptions are correct. You can render absolutely anything you want from GetDesignTimeHtml, and you don't have to render a single thing from the actual control, since the designer overrides it and we're not actually rendering the control at runtime.
I have determined that the problem is actually related to WebControl.AddAttributesToRender.
This method seems to add css positioning information to the control's main tag that allows it to move around in the designer. However, I don't know where it's getting those values from. ControlStyle is empty. Attributes is empty. There's something tricky going on in this function.
GetDesignTimeHtml AddAttributesToRender designer positioning