C
C#2y ago
JoyCx

❔ WPF- brush access from different style and template

I've got an animation setup using storyboard in a textbox's template, when (trigger, mouseover) happens it changes a solidcolorbrush which is defined outside the template using a key. The same brush which changes is set to a borderbrush of a border, using the same key as a dynamicsource. Ive tried doing the same using the border which is "built in" the textbox itself but it creates an odd pixelgap between the border and the textbox so i used the top method to work around it. The problem i've got is "linking" between the solidcolorbrush outside, and the property change inside the template, when trying to use {DynamicSource MyBrush} or the name itself "MyBrush" for example in the TargetName doesn't work. Any ideas how to fix it? Thanks.
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.