views:

39

answers:

1

I am building an ASP.NET Web User Control which has a panel within it.

How do I make the Panel within the user control resizable (i.e. with handles) at design time in Visual Studio.

I need to create a design class or something??

Thanks.

+1  A: 

Hi Alyn,

I would create a Web User Control with that Panel in it: http://webproject.scottgu.com/CSharp/UserControls/UserControls.aspx

Then I would add property PanelWidth and PanelHeight to that control. Use setter of these properties to set width and height of the panel inside your control.

In order for your properties to be visible in property browser use Browsable attribute: http://msdn.microsoft.com/en-us/library/system.componentmodel.browsableattribute%28VS.71%29.aspx

In order to detect if you are in design mode or not use the method described here: http://www.west-wind.com/WebLog/posts/189.aspx

This is not 100% what you wanted but might give you some useful ideas.