Designer not refreshing display

S

Stuart Campbell

Someone please help me before I tear my hair out! :)

I have a control derived from System.Web.UI.WebControls.Panel.
I have a designer derives from System.Web.UI.Design.WebControls.PanelDesigner.
I have added a designer verb... = new DesignerVerb("Maximize", new EventHandler(this.Maximize));

Problem:
======
The Maximize verb works perfectly (just changes the height and width to 100%) but the actual panel doesn't resize.
If I switch to HTML view and then back to the designer - bingo it is resized.

Question:
======
What do I need to call to make sure the designer updates as soon as the verb is executed?
Please - someone put me out of my misery.

--------------
The code that is triggered by "Maximize".....
--------------

public void Maximize(object sender, EventArgs e)
{
ContentContainer container = Component as ContentContainer;
container.Width = new Unit("100%");
container.Height = new Unit("100%");
}

TIA
Stuart
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top