The easiest way to create an event handler is to use Visual Studio Designer.
1. Open the page in Visual Studio
2. Switch to the Design view using a button in the lower-left corner:
3. Select the control (e.g. DayPilotCalendar) by clicking on it.
4. In the Properties toolbox, switch to the Events view using the lightning icon:
5. To create a new event handler, double-click the space next to the event name:
6. A new method that handles the event will be created: