I have multiple TextBlocks which reference different elements in my application. My code works fine when used directly in the page. However, I want to create a ControlTemplate
This seems like a funny way to template something, but it can be done, you just have to get a bit fancy with your bindings.
The below will work, but I still dont think this is a good way to template a control
Bind the TextBlock
Tag
to the actual Element, then in the ControlTemplate
bind Tag
to Tag
and use the values from there as Tag is the Element, you can use any element from it.