如何在C#和VS2010中实现视觉继承

发布于 2024-09-18 03:53:21 字数 83 浏览 1 评论 0原文

我正在使用 VS2010 和 WinForms,并且需要大量表单来创建/更新数据实体。我该如何创建一个从中继承的基本表单(取消和确定按钮、实体参数等)?

I'm using VS2010 and WinForms, and needs lots of forms for creating/updating data entities. How can I go about creating a base form from which to inherit (Cancel and OK buttons, entity parameters, etc)?

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

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

发布评论

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

评论(1

请帮我爱他 2024-09-25 03:53:21

图形界面(尤其是表单)中的继承并不是最容易实现的事情。您可能最好使用可重用的用户控件

它与实体框架无关,而更多地与您正在使用的图形库类型有关(假设是 Windows 窗体,但也可能是 WPF 甚至 WebForms)。

Inheritance in graphical interfaces (especially forms) is not the easiest thing to achieve. You would probably be better off using reusable user controls.

It has nothing to do with Entity Framework, but more with the kind of graphical library you're using (assuming Windows Forms, but could be WPF or even WebForms).

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