Silverlight中DoubleAnimation的实际/当前值
本文关键字:DoubleAnimation Silverlight | 更新日期: 2023-09-27 18:12:37
我想在Silverlight 4.0中获得动画属性的实际值
我想动画ScaleTransform ScaleX属性,当我停止故事板时需要实际值。
我也试过这个:http://haishibai.blogspot.com/2010/09/siliverlight-on-windows-phone-7-get.html但它没有工作!
我能够获得RenderTransform的当前旋转属性与以下
var x = needle.RenderTransform.GetValue(CompositeTransform.RotationProperty);
所以我猜你应该把RotationProperty
换成ScaleXProperty
where needle =
<ed:RegularPolygon Name="needle" Height="81.5" InnerRadius="1" Canvas.Left="78" PointCount="3" Stretch="Fill" Stroke="Black" Canvas.Top="17.5" UseLayoutRounding="False" Width="15" Fill="#FFFFBB00" StrokeThickness="0" RenderTransformOrigin="0.5,0.838" >
<ed:RegularPolygon.RenderTransform>
<CompositeTransform Rotation="-140"/>
</ed:RegularPolygon.RenderTransform>
</ed:RegularPolygon>