Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting all possible events for a control in C#
Message
 
 
À
03/03/2009 16:31:09
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01385323
Message ID:
01385353
Vues:
38
>>>In the code window in VB I was able to use the left handed drop down to view all the controls on my form, and the right handed drop down to select an event for that control. This would create a method signature. Why doesn't C# do this? Is there an alternative?
>>
>>Select the control, go to Properties window, Methods, double click on the method there (from memory).
>
>Yes, that was it. To make it more clear for anybody in the future, there is an Events button in the toolbar of the Properties window.

Right, the thunderbolt. One of the things I like about the way VS works is that when you click an event in the Properties events list, a dropdown lets you choose any handler method that has a matching signature. So if there are multiple controls that need the same action on a particular event, you only need to write one method for all of them. Not that you can't achieve the same result with other tools, it's just pleasing the way it's implemented in VS.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform