Summary
Creating a user control, or any control that uses a XAML file with a C# code-behind file, is a straightforward way to encapsulate some elements that you want to use multiple times. Creating a custom control, however, involves many unorthodox concepts for people who aren’t familiar with styles, templates, resources, and data binding. If such a developer doesn’t care about restyling and theming, the extra complication doesn’t add much value! That’s XAML-based UI frameworks have a bifurcated view of custom controls versus user controls.
Of course, even these two approaches are not the only options for reusable UI elements. For example, you could create a custom lower-level element that derives directly from FrameworkElement. A common non- ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access