UserControlcomes from ContentControl. It doesn’t sound like you need content (the ability to place additional controls inside your figure), so I will continue to climb the hierarchy ...
Here's a breakdown of the pedigree:
UserControl
ContentControl
Control
FrameworkElement
UIElement
Visual
...
Controldefines Template, therefore, I believe that the easiest way to achieve what you want is to use Control:
<Control Style="{StaticResource MyStyle}"/>
... and use Styleto install the template and any / etc triggers you need.
If you need to place a child inside your shape, you should use ContentControlthis way:
<ContentControl Style="{StaticResource MyStyle}"/>
If you find this approach is too heavy at runtime, you can use Shape .
Shape
FrameworkElement
UIElement
Visual
...
Shape Control, FrameworkElement. . , , , DefiningGeometry. , Control, , .
, DrawingVisual. MSDN:
DrawingVisual - , , . , , .
, , .