本文介绍了什么时候和为什么要我实现IComponent的,的IContainer和的ISite?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了半天什么IComponent的,的IContainer和的ISite是。我读过的文档,但它是非常模糊的(或者说我想这个问题太用力)。我知道,如果我创建一个类作为一个组件,它可以在Visual Studio设计使用。但我真的想知道更普遍:?什么组件/容器模式完成,并可以将它让我的生活更轻松。

I've wondered for a long time what IComponent, IContainer, and ISite are for. I've read the documentation, but it is extremely vague (or I'm thinking about it too hard). I know that if I create a class as a component, it can be used in the Visual Studio designer. But I'd really like to know more generally: what does the Component/Container pattern accomplish, and can it make my life easier?

推荐答案

它们是管道的Windows窗体设计器。你很少有自己实现这些,只是源于组件的组件类。开始担心他们,当你想实现自己的设计师。这样做甚至少有记载。

They are plumbing for the Windows Forms designer. You rarely have to implement them yourself, just derive your component class from Component. Start worrying about them when you want to implement your own designer. Doing so is even less documented.

这篇关于什么时候和为什么要我实现IComponent的,的IContainer和的ISite?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-11 01:46