Click here to Skip to main content
16,008,183 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How can i write a code to write a button click event in c#?
Posted

Which is it, XML or code ? You can put Click="OnClick" in your XAML, or you can put button.Click += in your code, and it will auto complete for you. All event handlers have the same format

voi OnClick(object sender, RoutedEventArgs ea)
{

// Add code here.
}
 
Share this answer
 
Comments
rkarthickbeece 7-Jul-11 4:44am    
i used this code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900