Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Do I Call OnResize() ?
Message
De
17/07/2009 08:57:04
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
17/07/2009 03:55:18
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01412846
Message ID:
01412945
Vues:
41
>>>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)


I know that, I was trying to figure out what Kevin was asking. You don't want to make a new set of event args and pass to the base handler.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform