Component vs. Control

后端 未结 4 986
一生所求
一生所求 2021-02-20 08:46

In the world of WinForms .Net controls

What is the difference between Component and Control?

  • Can a Control contains any Component?
  • Can a Compone
4条回答
  •  说谎
    说谎 (楼主)
    2021-02-20 09:28

    A Component is just a representation of an object/sub API. eg. ImageList is a component which is invisible and is just an API into a set of images. The fact you can drag and drop them onto forms is just sugar in the designer.

    A Control is intended to be visible/interactable/nestable.

提交回复
热议问题