Wednesday, January 30, 2013

Difference between UserControl & Custom Control

UserControls
  1. UserControl is easier to create.
  2. UserControl defines its User Interface in the plain xaml file.
  3. User control also can be added in your toolbox. It is a tightly coupled control with respect to your code .
  4. Once u use UserControl in UI it is fixed can’t be changed in ur referenced projects.
  5. UserControl derives from System.Windows.Controls.UserControl.
  6. UserControls can’t be, themeable , or skinnable(only child controls of usercontrol are skinnable).
  7. UserControl is a set of Controls
CustomControl
  1. CustomControl   Is  harder to create
  2. CustomControl     defines it's User Interface in ResourceDictionary generally called it generic.xaml
  3. CustomControl     Full Toolbbox Support .It is a loosely coupled control with respect to your code.
  4. CustomControl  Gives much more flexibility & u are freedom to use(can be changed) it in ur any referenced Projects.
  5. CustomControl    Derives from System.Windows.Controls.Control Class ,
  6. CustomControl    Canbe Themeable,Skinnable
  7. CustomControl  generally  Defines in a single control

No comments:

Post a Comment