[ACCEPTED]-Window vs User Control-user-controls

Accepted answer
Score: 37

A Window is as the name suggests a window, it can be 8 closed, minimized, resized etc. This should 7 be quite intuitive.

A UserControl on the other hand 6 is a composite component/module which can be placed inside other controls 5 and is itself made up of controls (possibly 4 even other UserControls), the main use for 3 UserControls is reusability, encapsulation and loose coupling, some applications 2 can be broken up into a set of UserControls 1 of which each one provides a certain functionality.[citation needed]

Score: 31

We make user control if we want to reuse 10 it. As name says User Control it means some 9 control like grid,combo box like that.If 8 i need same grid on 3-4 windows then i will 7 prefer to make it as User Control.If it 6 is not reusable i will define my grid in 5 the required window.At last you paste your 4 user control on some window.

Conclusion :- If 3 you want to reuse the control then make 2 it as a user control otherwise define it 1 in required window.

Score: 9

A window is managed by the OS and is placed 5 on the desktop.

A UserControl is managed 4 by wpf and is placed in a Window or in another 3 UserControl.

Applcations could be created 2 by have a single Window and displaying lots 1 of UserControls in that Window.

Score: 2

wpf window is a Win32 window, but user control 1 is just something of wpf, not a Win32 window.

Score: 1

I presume you refer to the windows forms. Usually 4 they are classified as user controls and 3 custom controls - same stands for web forms 2 as well. For more information you can refer 1 to these links control vs user control in winforms and over view of user controls and custom contorls.

More Related questions