Qus:    What is the difference between custom and user control?
Nov 07, 2020 04:15 2 Answers Views: 111 SAI

 Custom Control

Derives from control

Dynamic Layout

Defines a single control

It has full toolbox support

Loosely coupled control

User Control

Derives from UserControl

Static Layout

Defines a set of con

Cannot be added to the toolbox

Tightly coupled control

Prev Next
Answers (2)
ARUNA Nov 10, 2020 04:34
Answer:   Custom Control
Derives from control
Dynamic Layout
Defines a single control
It has full toolbox support
Loosely coupled control
User Control
Derives from UserControl
Static Layout
Defines a set of con
Cannot be added to the toolbox
Tightly coupled control

PARTH Nov 11, 2020 08:57
Answer:   The main difference between Custom Control and User Control is that they inherit from different levels in the inheritance tree . A Custom Control generally inherits from the System.Windows.Controls.Control class. You may derive from a different custom control depending on your requirement. A UserControl inherits from the System.Windows.Controls.UserControls class, which inherits from the base "Control" class.

Custom control is designed for single-application scenarios because if the same control needs to be used in more than one application, it introduces redundancy and maintenance problems. While UserControl designed so that it can be used by more than one application. It can distributed easily and without problems associated with redundancy and maintenance . CustomControl is a loosely coupled control w.r.t code and UI while UserControl is a tightly coupled control with respect to code and UI. When using CustomControl UI can be changed in different projects but for a UserControl UI is fixed and can't have different looks in different project. Moreover, creating a custom control requires in-depth knowledge of Silverlight UI Model whereas UserControl does not require in-depth knowledge of the UI Model.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect