.Net Compact Framework 中的 WinForms UserControl 继承

发布于 2024-08-20 19:07:03 字数 167 浏览 1 评论 0原文

完整的 .Net 框架具有继承的 UserControl,但在 Compact Framework 项目中创建新控件时,Visual Studio 不提供此选项。

手动将一个用户控件的祖先类更改为另一个用户控件会导致设计者在随后尝试打开该控件时引发异常。

有人知道用户控件继承是否可能吗?

The full .Net framework has an inherited UserControl but this option isn't offered by Visual Studio when creating a new control in a Compact Framework project.

Manually changing the ancestor class of a user control to another user control results in an exception being thrown by the designer when subsequently trying to open it.

Anyone know if user control inheritance is possible?

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

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

发布评论

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

评论(2

朮生 2024-08-27 19:07:03

我在此博客条目中有一些关于 CF UserControls 的注释。简而言之,“除非您打算成为一名控件供应商,否则不要浪费时间,甚至尝试让设计师支持工作。”

I have some notes on CF UserControls in this blog entry. The short of it is "Unless you plan to be a control vendor don't bother wasting your time even trying to get designer support working."

忘年祭陌 2024-08-27 19:07:03

我已经成功运行继承的控件,但在设计器中绝对没有成功。我必须将父级设置为 Control 才能使用设计器,然后在部署之前(关闭设计器后)将其设置为我的父级控件。

I've had success running inherited controls but absolutely none within the designer. I've had to set the parent as Control to use the designer and then set it to my parent control prior to deploying (after closing the designer).

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