Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I Call OnResize() ?
Message
From
17/07/2009 03:55:18
 
 
To
16/07/2009 16:28:16
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01412846
Message ID:
01412913
Views:
42
>>I have a usercontrol, and internally I'm changing it's size. I then have:
>>
>>
>>        protected override void OnResize(EventArgs e)
>>        {
>>            // My code here
>>
>>            base.OnResize(e);
>>        }
>>
>>
>>What event args is it expecting?
>
>You usually have object Sender and EventArgs (of some kind) e. These arguments are provided to you by the event system and should be prefilled. If you want to create your own you can.

Actually the Reszie event passes object and Eventargs parameters - the OnResize() method only receives the Eventargs (the 'sender' obviously being the class itself). But to Kevin's question 'What event args is it expecting?' the answer is just an instance of the Eventargs class - which doesn't contain any embedded info so can be called with OnResize(new Eventargs()) or just OnResize(null)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform