DoubleAnimationUsingKeyFrames动画不能用于动画属性RenderTransform'因为它是不兼容的类型转换

时间:2012-11-22 18:38:15

标签: c# .net wpf mahapps.metro

使用MetroContentControl MahApps.Metro时,我在WPF应用程序中收到此异常。

'System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames' animation object cannot be used to animate property 'RenderTransform' because it is of incompatible type 'System.Windows.Media.Transform'.

我的视图未在设计模式下呈现。但是在Build上工作得很好。

任何人都可以建议我,这个例外的可能解决方案是什么。

1 个答案:

答案 0 :(得分:2)

似乎你不能仅仅因为RenderTransform不是double类型而使用双动画。请改为查看PropertyAnimation并为其提供一个新的整个Transform对象。

相关问题