【问题标题】:When and why should I implement IComponent, IContainer, and ISite?何时以及为什么应该实现 IComponent、IContainer 和 ISite?
【发布时间】:2010-09-21 09:04:04
【问题描述】:

我一直想知道 IComponent、IContainer 和 ISite 是干什么用的。我已经阅读了文档,但它非常模糊(或者我想得太难了)。我知道如果我创建一个类作为组件,它可以在 Visual Studio 设计器中使用。但我真的很想更广泛地了解:组件/容器模式完成了什么,它能让我的生活更轻松吗?

【问题讨论】:

    标签: c# .net system.componentmodel


    【解决方案1】:

    他们正在为 Windows 窗体设计器提供管道。您很少需要自己实现它们,只需从 Component 派生您的组件类。当您想实现自己的设计器时,开始担心它们。这样做的记录更少。

    【讨论】:

    • Container & Component 用于创建可联网应用程序的可用性如何?
    • 它只是一个模式/通用框架来实现基于组件的软件。 《Programming .NET Components》这本书很棒!
    猜你喜欢
    • 2010-10-27
    • 2021-05-15
    • 2010-12-07
    • 1970-01-01
    • 2021-01-11
    • 2014-05-22
    • 2021-11-07
    • 2023-03-08
    • 2011-05-08
    相关资源
    最近更新 更多