.NET 是否有与 Delphi 的 VCL 组件模型等效的模型?

发布于 2024-10-15 03:37:40 字数 486 浏览 2 评论 0原文

请原谅“双关语”,但我是一名(很长)时间的 Delphi 开发人员。我已经在版本 6 上呆了很长时间了,因为它是我开发所需的一切。然而,最近我一直在考虑进入.NET,因为这似乎是Win32/64 EXE 开发的主导方向。我最关心的是 .NET 中是否有一些东西可以充当 Delphi 中 VCL 组件模型的等价物。

让我这样解释一下我最关心的问题。在 Delphi 中,我可以创建一个自定义组件,该组件一旦完成,将成为 Delphi 组件选项板(“小部件”面板)的成熟成员,我可以在设计时将其拖放到表单上,并使用 IDE 的属性检查器/编辑器来填写与组件相关的属性,甚至更好的是,为各种程序员定义的事件处理程序填写代码存根(我知道后者就像 VB 和许多其他 IDE。)但最重要的是,我可以创建起作用的组件作为其他组件的容器。在设计时,我可以添加与父级不同类型的子组件,并使用与顶级组件相同的属性编辑器范例方便地填写子实例的属性和事件处理程序。我开始喜欢这种功能,并且想知道 .NET 是否有同样方便的功能来管理/编辑设计时包含其他组件的组件。

Pardon the "cast pun" but I am a (long long) time Delphi developer. I have stayed at version 6 for an eternity now because it was everything I needed for development. However, lately I've been thinking of getting into .NET because that seems to be the dominant direction for Win32/64 EXE development. My biggest concern is having something in .NET that serves as an equivalent to the VCL component model in Delphi.

Let me explain my biggest concern this way. In Delphi, I can create a custom component that once completed, will become a full fledged member of the Delphi component palette ("widget" panel), that I can drag and drop on to a form at design time, and use the IDE's property inspector/editor to fill in properties pertinent to the component and even better, fill out code stubs for various programmer defined event handlers (the latter is like VB and many other IDE's, I know.) But most importantly, I can create component's that act as containers for other components. At design time, I can add child components of a different type than the parent and conveniently fill out the properties and event handlers for the child instances using the same property editor paradigm as for top level components. I have come to adore this capability and I would like to know if .NET has something equally facile at managing/editing components that contain other components at design time.

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

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

发布评论

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

评论(3

她如夕阳 2024-10-22 03:37:40

假设我正确理解您的请求,这肯定是 .NET / Visual Studio 功能集的一部分。

使用 WinForms(桌面应用程序开发最常用的项目类型,尽管 WPF 正在普及),您可以创建组件,然后将这些组件作为子组件添加到可视控件(或窗口,称为窗体)或其他组件。

Assuming I understand your request correctly, that's certainly a part of the .NET / Visual Studio feature set.

Using WinForms (the project type most commonly used for desktop application development, though WPF is gaining ground), you can create components that can then be added as child components either to visual controls (or windows, called Forms) or to other components.

雅心素梦 2024-10-22 03:37:40

Windows 窗体 基本上类似于 .NET 的 VCL。它以非常相似的风格(尽管框架不同)提供了与您习惯使用 VCL 相同的大部分基于组件的行为。

话虽这么说,如果您要跳槽,您可能需要考虑考虑 WPF 和 Silverlight。它们为应用程序开发提供了一个更好的(一旦你克服了学习的困难)模型。这实际上是 .NET 的首选开发模型(尽管 Windows 窗体仍然相当流行),因为它提供了许多好处。

Windows Forms is basically like VCL for .NET. It provides most of the same component-based behavior that you are used to with VCL, in a very similar style (though a different framework).

That being said, if you're going to jump ship, you may want to consider looking at WPF and Silverlight. They provide a much nicer (once you get over the hump of learning it) model for application development. This is really the preferred development model going forward with .NET (though Windows Forms is still quite popular), as it provides many benefits.

剩一世无双 2024-10-22 03:37:40

您可以尝试德尔福棱镜。它生成 .NET 可执行文件。
http://www.embarcadero.com/products/delphi-prism
http://en.wikipedia.org/wiki/Delphi_Prism

You can try Delphi Prism. It generates .NET executables.
http://www.embarcadero.com/products/delphi-prism and
http://en.wikipedia.org/wiki/Delphi_Prism

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