I created a simple user control in WPF and added an image to it:
<Image x:Name="logo" Source="/View/Images/Logo.png" Width="100" Height="100"> <Image.RenderTransform> <RotateTransform Angle="0" CenterX="50" CenterY="50" /> </Image.RenderTransform> </Image>
I want this image to constantly rotate and disappear. This should be used as an indicator of employment. So I created this animation storyboard:
<Storyboard RepeatBehavior="Forever"> <DoubleAnimation From="0" To="360" Duration="00:00:05" Storyboard.TargetName="logo" Storyboard.TargetProperty="(RotateTransform.Angle)" /> <DoubleAnimation From="0.1" To="1" AutoReverse="True" Duration="00:00:02" Storyboard.TargetName="logo" Storyboard.TargetProperty="Opacity" /> </Storyboard>
However, when I look at a window with a usercontrol in it, fading works, but spiinning does not.
source share