© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
1 reply
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.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ WPF Border TemplateBinding
C#CC# / help
4y ago
c# wpf style
C#CC# / help
11mo ago
WPF UI Template
C#CC# / help
13mo ago
Help with WPF style
C#CC# / help
2y ago