✅ Help understanding WPF (XAML)
Hi, I am having difficulty understand this snippet of code. I understand conceptually what it does - it adds a controltemplate to the specified targetType (in this case a button element). It does this by creating a grid instance and then an Ellipse object. The ellipse object and its attribute is "linked" to the button element. If I understand it correctly, that is.
I think what mostly confuses me is why so many tags are used. Why do we need the <Setter Property="Template"> AND the <Setter.Value> ? why can´t we just add the controltemplate tag directly? because as far as I can see, the controltemplate already contains information about the property, value and targettype.
I think what mostly confuses me is why so many tags are used. Why do we need the <Setter Property="Template"> AND the <Setter.Value> ? why can´t we just add the controltemplate tag directly? because as far as I can see, the controltemplate already contains information about the property, value and targettype.

