2010-07-21 89 views

回答

13

假设初始的标签的fontWeight设置是正常的,就像下面:

<Label x:Name="label" Content="Label" HorizontalAlignment="Left" FontWeight="Normal" VerticalAlignment="Top"/> 

你可以有以下情节串连图板,使fontWeight设置标签的粗体:

<Storyboard> 
    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.FontWeight)" Storyboard.TargetName="label"> 
     <DiscreteObjectKeyFrame KeyTime="0"> 
      <DiscreteObjectKeyFrame.Value> 
       <FontWeight>Bold</FontWeight> 
      </DiscreteObjectKeyFrame.Value> 
     </DiscreteObjectKeyFrame> 
    </ObjectAnimationUsingKeyFrames> 
</Storyboard> 
+0

正是我正在寻找。谢谢! – Daniel 2010-07-22 12:47:24

0

,你可以使用一个转换到双fontWeight设置(如果动画值超过一定阈值开关大胆),但我不认为你可以实现这两种状态之间非常流畅的动画转换器。

相关问题