更改Visual Studio中控件的默认事件 [英] change the Default Event of a control in Visual Studio

查看:98
本文介绍了更改Visual Studio中控件的默认事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Visual Studio中更改控件的默认事件?

IE;当我们在文本框上单击DBl时,它将打开代码编辑器"窗口,默认事件为 已更改文本.我可以将其更改为 Click事件,以便默认情况下单击它时::(

Is it possible to change the Default Event of a control in Visual Studio ?

i.e; When we DBl click on a Textbox it Opens Code Editor window and the default Event is Text Changed. Can i change it to Click Event, So that it will come by default as click :(

推荐答案

是:执行此操作的几种方法:最简单的方法是在设计视图中打开页面,选择控件,单击鼠标右键,选择属性.单击事件"按钮(看起来像闪电一样),选择所需的事件,然后选择您已经拥有的方法或双击它,它将为您创建事件.
Yes: couple of ways to do this: easiest is open the page in design view. Select the control, right-click, properties. Click the ''Events'' button (looks like a lightning bolt). Select the event you require and either select a method you already have or double-click and it will create the event for you.


感谢您的回答,这是一个很好的答案,但我想更改默认行为,而不是对于一个控件,但对于所有控件
Thanks for Answering , It is a good answer , but i want to change the Default Behavior not for one control but for all the controls


这篇关于更改Visual Studio中控件的默认事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆