Interesting, I managed to replicate that behaviour from your example, and although I can't be entirely sure, I think I might understand what's going on.
Based on the answers to this question: WPF TemplateBinding vs RelativeSource TemplatedParent it seems that although two methods achieve the almost same thing, they differ in some key behaviours. The most relevant one being mentioned by Miroslav Nedyalkov -
"TemplateBindings don't allow value converting. They don't allow you to pass a Converter and don't automatically convert int to string for example (which is normal for a Binding)."
I would guess that in the second case, thebinding will use the built in WPF convertor to convert the bound string
/URI
to an ImageSource
(usual behaviour when specifying an ImageSource
- it's why you don't usually need to specify a binding convertor).
In the first case, you won't get the default value converting, so you won't see the mask. Interesting to see if it would work if a convertor was specified.
Edit: It looks there might be some additional complications from ImageBrush
not inheriting from FrameworkElement
: Bind an ImageBrush to a template with a DependencyProperty