Difference Between a CustomControl and a UserControl
So now you have got the difference between a Custom Control and a User Control, I guess. Let's summarize the differences again. Read the comparison below to make things clear:
| Custom Control | User Control |
| A loosely coupled control w.r.t code and UI | A tightly coupled control w.r.t code and UI |
Derives from Control | Derives from UserControl |
Defines UI in a ResourceDictionary | Defines UI as normal XAML |
| UI is skinable | Child controls are skinable |
| Has dynamic layout | Has static layout |
| UI can be changed in different projects | UI is fixed and can't have different looks in different project |
| Has full toolbox support | Can't be added to the toolbox |
| Defines a single control | Defines a set of controls |
| More flexible | Not very flexible like a Custom Control |
| Requires in-depth knowledge of Silverlight UI Model | Does not require indepth knowledge of the UI Model |
No comments:
Post a Comment