tags:

views:

14

answers:

1

how can i assing static or dynaimc resource to animation. Eg how can i assign a brush resource to From or To property of ColorAnimation.

A: 

ColorAnimation operates on Color objects, not Brush objects. If you're trying to use SolidColorBrush resources you can just change them to Color or change the brushes to reference new Color objects. Change:

<SolidColorBrush x:Key="MyBrush" Color="Red"/>

to

<Color x:Key="MyColor">Red</Color>
<SolidColorBrush x:Key="MyBrush" Color="{StaticResource MyColor}"/>

To="{StaticResource MyColor}"
John Bowen