04 June 2014

Custom Control vs User Control


S.NoCustom ControlUser Control
1A loosely coupled control w.r.t code and UI.A tightly coupled control w.r.t code and UI.
2Derives from Control.Derives from UserControl.
3Defines UI in a ResourceDictionary.Defines UI as normal XAML.
4UI is skinable.Child controls are skinable.
5Has dynamic layout.Has static layout.
6UI can be changed in different projects.UI is fixed and can't have different looks in different project.
7Has full toolbox support.Can't be added to the toolbox.
8Defines a single control.Defines a set of controls.
9More flexible.Not very flexible like a Custom Control.

No comments: