When you Double-Click on a Control in the Visual Studio Designer, you automatically subscribe to some event and an Event Handler is generated in the code behind file.

Double-Clicking on the following Controls subscribes to the corresponding event

  • UserControl - Loaded
  • Button - Click
  • TextBox - TextChanged
  • Grid - No event
    etc.

How is this specified, is it a Visual Studio setting? Can this be overrideen and how can you specify which event you want to link to Double-Click for e.g. a Custom Control?

Thanks

Edit
Report