Reputation: 25
I am working on cocoa application for OSX in Xamarin in which i am adding controls like buttons, Shapes etc programmatically to the Sub View. I know how to add click events during the design design time. Is there any way to implement the events (click etc) for the controls which are programmatically added in the view ?
Upvotes: 0
Views: 41
Reputation: 1418
Use the activated event:
Btn1.Activated += Btn1_Activated;
or
Btn1.Activated += (sender, e) => {
// code here
};
Upvotes: 1