如何创建需要其他控件属性的控件?

发布于 2024-08-20 15:35:19 字数 290 浏览 4 评论 0原文

我刚刚创建一个使用 ToolTip 控件,我想到这个控件(或术语上正确的组件)提供设计时属性对于表单上的所有其他控件。

我怎样才能实现这一点来控制我​​的设计?

I was just creating a Windows form that uses a ToolTip control and it occurred to me that this control (or component to be right on the terminology) provides design time properties for every other control on the form.

How can I achieve this for a control of my design?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蘑菇王子 2024-08-27 15:35:19

这个神奇之处是通过继承和实现 IExtenderProvider 接口创建的。这很容易做到,设计师正在做所有繁重的工作。这篇MSDN Library 文章中有一篇非常好的操作方法。

That bit of magic is created by inheriting and implementing the IExtenderProvider interface. It is pretty easy to do, the designer is doing all the heavy lifting. There's a very good How To in this MSDN Library article.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文