WPF abnormal CPU usage for animation

Posted by 0xDEAD BEEF on Stack Overflow See other posts from Stack Overflow or by 0xDEAD BEEF
Published on 2010-05-23T07:25:23Z Indexed on 2010/05/23 7:30 UTC
Read the original article Hit count: 364

Filed under:
|
|

HI! I am developing WPF application and client reports extreamly high CPU usage (90%) (whereas i am unable to repeat that behavior). I have traced bootleneck down to these lines. It is simple glowing animation for small single led control (blinking led). What could be reason for this simple annimation taking up SO huge CPU resources?

                <Trigger Property="State">
                    <Trigger.Value>
                        <local:BlinkingLedStatus>Blinking</local:BlinkingLedStatus>
                    </Trigger.Value>
                    <Trigger.EnterActions>
                        <BeginStoryboard Name="beginStoryBoard">
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetName="glow" Storyboard.TargetProperty="Opacity" AutoReverse="True" From="0.0" To="1.0" Duration="0:0:0.5" RepeatBehavior="Forever"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.EnterActions>
                    <Trigger.ExitActions>
                        <StopStoryboard BeginStoryboardName="beginStoryBoard"/>
                    </Trigger.ExitActions>
                </Trigger>

© Stack Overflow or respective owner

Related posts about wpf

Related posts about animation