What is the difference between user control and custom control in WPF?

Posted by Rajendra.prasad under WPF on 6/10/2010 | Views : 3603 | Status : [Member] | Replies : 1
1. What is the difference between user control and custom control in WPF?
a). UI which will be used repeatedly in project, using usercontrol is a much simpler and preferred way

b). a portion of UI and functionality which you believe will be used across different projects, then using custom control is the right approach.

c). a user control doesn't support controltemplate and themes. But creating a usercontrol is much like creating a normal window with codebehind. A usercontrol exists of a xaml-file and a codebehind-file. Define eventhandlers in xaml and implement them in code.

d). a custom control supports controltemplates and themes. A custom control is a "lookless" control. The logic is in a code-file (.cs) and the look is defined in a controltemplate that is part of a style.

e). all the above




Responses

Posted by: Vuyiswamb on: 11/5/2010 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
http://stackoverflow.com/questions/807703/wpf-what-is-the-difference-between-a-user-control-library-and-a-custom-control-l

Thank you for posting at Dotnetfunda
[Administrator]

Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response