I have wpf data trigger as below.
<DataTrigger Value="0" Binding="{Binding Path=TestDirection,Mode=OneWay}">
<DataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource LastDonePrice_UpTickDirection_Blink}"/>
</DataTrigger.EnterActions>
</DataTrigger>
<DataTrigger Value="2" Binding="{Binding Path=TestDirect开发者_开发技巧ion,Mode=OneWay}">
<DataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource LastDonePrice_DownTickDirection_Blink}" />
</DataTrigger.EnterActions>
</DataTrigger>
TestDirection is the property of Generic Type returning '0' or '2'. I want to animate the storyboard based on this values. But It's not working now. Please advise. Thanks.
You can write a Value Converter while binding "TestDirection" and value converter will return a boolean value if that generic type is 0 or 2....
some thing like this...
<DataTrigger Value="true" Binding="{Binding Path=TestDirection,Converter={StaticResource <Converter>},Mode=OneWay}">
精彩评论