I was looking some tutorials on how to create custom controls in WinRT, and I have a question.
Let\'s say I want to create a simple control that contains some stuff,
TLDR
A custom (templated) control allows an app to use the Template property to replace the control’s internal element tree. If you don’t need/want your control to have that re-templating feature, then use a UserControl as it’s easier.
UserControl
UserControl is a lot easier to create with Visual Studio or Blend giving you a decent design view support.Such view is often backed with a corresponding view model if you choose to adopt the MVVM pattern.
One problem with a UserControl is that while you can reuse it in multiple places in your app - it is difficult to make slight adjustments to the way it looks or behave in different places in your app since it doesn't use templates and the UI tree is loaded in the constructor.
Custom control
custom control or in some cases templated control is best suited for a small chunk of UI that serves a single purpose - it visualizes a single, specific type of information.Button, ToggleButton, ContentControl, Slider, TextBox or ListView to add to or override its logic. There are cases though when it makes sense to make one from scratch, subclassing "virtually abstract" Control, ItemsControl, RangeBase, Shape or even FrameworkElement (the last two are not templated).Collapsed to Visible which allows to defer loading parts of your UI to get performance improvements.Custom panel
A custom panel is yet another type of UI element that allows to customize how it lays out its children.