简体   繁体   English

VS2010 扩展帮助

[英]VS2010 extension help

I have an extension idea, but I don't know where the first step is.我有一个扩展的想法,但我不知道第一步在哪里。 I know that using design view, in conjunction with properties, I can get an event list for a control.我知道使用设计视图,结合属性,我可以获得控件的事件列表。

I want to write something that would show me a context menu in source view on something like OnClick="Button1_Click" and generate an empty event method in code behind complete with args.我想写一些东西,它会在源视图中显示一个上下文菜单,比如 OnClick="Button1_Click",并在后面的代码中生成一个空事件方法,并带有 args。 (the equivalant of double clicking a button in design view) (相当于在设计视图中双击按钮)

I've never coded against the IDE itself, and I'm not having any luck finding a jumping off point, but I relly want some info that relates to that 'events' section of the properties box.我从来没有针对 IDE 本身进行编码,而且我没有任何运气找到一个起点,但我确实想要一些与属性框的“事件”部分相关的信息。

EDIT: why am I getting negative numbers for asking a question, am I asking it wrong?编辑:为什么我问一个问题会得到负数,我问错了吗?

MSDN will help:) See these pages on how to provide a custom properties window. MSDN 将有所帮助:) 请参阅这些页面,了解如何提供自定义属性 window。

However, it won't be just as easy as your example, unfortunately.但是,不幸的是,它不会像您的示例那么简单。 There's quite a bit of infrastructure to deal with when programming VS extensions.在编写 VS 扩展时,有很多基础设施需要处理。 I'd recommend reading up on VS Integration on MSDN .我建议阅读MSDN 上的 VS 集成

Ok, so admittedly, I did not ever figure out how to do this.好的,诚然,我从来没有弄清楚如何做到这一点。 However, I've just read the VS11 will be doing this.但是,我刚刚读过VS11 会这样做。 I am happy to see that M$ has added this functionality going forward.我很高兴看到 M$ 在未来增加了这个功能。 They've also added smart tags to the html view, which means maybe never having to go to design view again!他们还在 html 视图中添加了智能标签,这意味着可能再也不需要 go 来设计视图了!

More Details Here:更多细节在这里:

http://weblogs.asp.net/scottgu/archive/2011/08/31/html-editor-smart-tasks-and-event-handler-generation-asp-net-vnext-series.aspx http://weblogs.asp.net/scottgu/archive/2011/08/31/html-editor-smart-tasks-and-event-handler-generation-asp-net-vnext-series.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM