Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Is there some good reason why a MultiTrigger segment should be in a resource dictionary, twice?

$
0
0

I'm trying to debug a lot of errors in a WPF app I'm working on, which we wrote two years ago. While investigating the errors I came across this code in a resource dictionary:

<MultiTrigger><MultiTrigger.Conditions><Condition Property="IsSelected" Value="true"/><Condition Property="Selector.IsSelectionActive" Value="false"/></MultiTrigger.Conditions><Setter Property="Background" TargetName="Bd" Value="{DynamicResource ModernButtonIconBackgroundPressed}"/><Setter Property="Foreground" Value="{Binding Source={StaticResource ItemTextSelected}, Converter={StaticResource colorConverter}}" /></MultiTrigger><MultiTrigger><MultiTrigger.Conditions><Condition Property="IsSelected" Value="true"/><Condition Property="Selector.IsSelectionActive" Value="true"/></MultiTrigger.Conditions><Setter Property="Background" TargetName="Bd" Value="{DynamicResource ModernButtonIconBackgroundPressed}"/><Setter Property="Foreground" Value="{Binding Source={StaticResource ItemTextSelected}, Converter={StaticResource colorConverter}}" /></MultiTrigger>                        

I could be just me, but that doesn't look right. But I'm not familiar with the MultiTrigger tag. So, is there a good reason to declare this definition twice, in a resource dictionary?


Rod


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>