简体   繁体   English

将自定义设计时命令添加到WinForms控件

[英]Add custom design time command to WinForms control

I have a custom WinForms control (inherits from control, ie without user interface jsut as Timer) to which I want to add a custom command add design time. 我有一个自定义的WinForms控件(继承自控件,即没有用户界面jsut作为Timer),我想添加一个自定义命令添加设计时间。

This could be similar to the "right click and choose 'Edit Items...'" of a menu. 这可能类似于“右键单击并选择菜单中的'编辑项目...'”。

Is this posisble? 这是可能的吗? How? 怎么样?

Also, could you recommend some general reading (online) about improving the design time experience of custom controls? 另外,您能否推荐一些有关改善自定义控件设计时间体验的一般性阅读(在线)?

First here is a link to the relevant MSDN doco on the subject 这里首先是关于该主题的相关MSDN doco的链接

http://msdn.microsoft.com/en-us/library/ms171567(VS.80).aspx http://msdn.microsoft.com/en-us/library/ms171567(VS.80).aspx

and more specifically 更具体地说

http://msdn.microsoft.com/en-us/library/system.componentmodel.design.menucommand(VS.80).aspx http://msdn.microsoft.com/en-us/library/system.componentmodel.design.menucommand(VS.80).aspx

As for a book that covers this, Chris Sells Winforms book is probably the best, however to be honest, I don't think that any of the books out there (on-line or otherwise) cover design time features in the sort of depth that I personally would like. 至于一本涵盖这一点的书, Chris Sells Winforms书籍可能是最好的,但说实话,我不认为那里的任何书籍(在线或其他)涵盖了那种深度的设计时间特征我个人想要的。

Another good link is 另一个好的联系是

http://msdn.microsoft.com/en-us/magazine/cc163758.aspx http://msdn.microsoft.com/en-us/magazine/cc163758.aspx

The article covers most of what is mentioned on this subject in Chris Sells' book, but the book is still worth buying. 这篇文章涵盖了Chris Sells的书中关于这个主题的大部分内容,但这本书仍值得购买。

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

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