UserControl
s are the simplest way to author controls. This type of control is best for "views" or "pages" that are specific to an application. UserControl
s are authored in the same way as you would author a Window
: by creating a new UserControl
from a template and adding controls to it.TemplatedControl
s are best used for generic controls that can be shared among various applications. They are lookless controls, meaning that they can be restyled for different themes and applications. The majority of standard controls defined by Avalonia fit into this category.TemplatedControl.
Style
for your TemplatedControl
in a separate file, remember to include this file in your Application via StyleInclude
.Control
s are the foundation of user interfaces - they draw themselves using geometry by overriding the Visual.Render
method. Controls such as TextBlock
and Image
fall into this category.Control.