Link to home
Start Free TrialLog in
Avatar of AdamEscobedo
AdamEscobedo

asked on

WPF: User Controls vs Control Templates

I am trying to figure out what the main difference is between a User Control and a Control Template.  It seems that in both cases I can specify what controls I want to use since the Control Template allows me to change the entire visual tree of the control I am templating, but the User Control allows me to define what controls I want to include as well.  What is the main difference here?
SOLUTION
Avatar of lulu2005
lulu2005

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree with lulu. You can do more with a user control, since you're defining not only a group of controls (potentially), but also the code behind, including event handling, etc.

The biggest factor in deciding to make a UC, though, is whether you're going to reuse it. There's little sense, IMO, in creating a user control for one time use.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial