.NET Windows Forms自定义控件,如何创建快捷菜单

前端之家收集整理的这篇文章主要介绍了.NET Windows Forms自定义控件,如何创建快捷菜单前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
某些控件有一个有用的上下文菜单来访问一些常用属性,例如标准TextBox

单击您获得的箭头:

如何使用自定义控件实现这一目标?
谢谢.

解决方法

您应该创建自己的控件设计器,它可以为VS表单设计器提供动词作为自定义菜单项或UI增强功能.

Designer:

A class that takes care of the appearance and behavior of the control
when hosted in Visual Studio .NET. You can use this class to add new
context menu verbs and,for ASP.NET controls,to explicitly indicate
the HTML code to show in the designer.

点击这里查看完整文章

Custom Design-time Control Features in Visual Studio .NET

猜你在找的Windows相关文章