Reputation: 41
Occasionally I will double-click a control on accident when moving them around in the designer. This creates a click event method in the associated class file along with the designer file. This can be undone, but ctrl+z seems to go back a step or two too far in the designer and is a minor nuisance. I don't have much need for the double-click shortcut and would prefer it removed entirely. Any advice is appreciated.
Upvotes: 3
Views: 164
Reputation: 81610
Probably not worth the effort, but you could just inherit from the control you are using and set the DefaultEvent attribute to nothing. For example:
[DefaultEvent("")]
public class ButtonEx : Button {
}
Now when you double-click on a ButtonEx control on the form in the designer, nothing happens.
Upvotes: 3