I have a usercontrol, that when one property changes, the bindings change for a number of different embedded controls (in the same user control). Before I waste too much time, is this something that can be done with a Trigger or DataTrigger? I can do it in code behind but this seems 'dirty'.
Sure, the following changes the Text binding of shiftButtonText when the IsPressed property of the current DataContext changes. Is this the type of thing that you're looking for?
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsPressed}" Value="True">
<Setter TargetName="shiftButtonText" Property="Text" Value="{Binding Path=PressedText}"/>
</DataTrigger>
</DataTemplate.Triggers>
Hope this helps,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With