0
在StoryBoard中擁有帶DoubleAnimation的TextBlock。
在Windows 7上 - 1-2% CPU使用率始終保持不變。
在Windows XP SP3上 - 10-15% CPU使用率。StoryBoard DoubleAnimation巨大的CPU使用率
<TextBlock Grid.Column="1" Height="Auto" Margin="10,0,0,0" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" PreviewMouseDown="incomMessages_SelectionChanged">
<TextBlock.Text>
<Binding Mode="OneTime" Converter="{StaticResource Converter}" ConverterParameter="NameAndId"/>
</TextBlock.Text>
<TextBlock.Style>
<Style>
<Style.Triggers>
<DataTrigger Binding="{Binding IsNew}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard Name="Blink">
<Storyboard BeginTime="00:00:01" RepeatBehavior="Forever">
<DoubleAnimation Storyboard.TargetProperty="(TextBlock.Opacity)" From="0" To="1" Duration="0:0:1" RepeatBehavior="Forever" AutoReverse="True"/>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
我做錯了什麼或它是WPF功能?
這可能是因爲硬件加速是XP有限/不存在的WPF:http://blogs.msdn.com/b/tims/archive/ 2007/01/05 /比較-WPF-ON-Windows的Vista的-v-Windows的xp.aspx?WA = wsignin1.0 –