.net - 有哪些方法可用于在 Storyboard Animations 中使用非固定值?

标签 .net wpf storyboard

如您所知,Animation.ToAnimation.From属性必须是严格的文字值,或使用 {StaticResource} 标记的资源扩展名,否则相当严厉InvalidOperationException应出现:Cannot freeze this Storyboard timeline tree for use across threads.
某些技术,包括(但不限于)ResourceDictionary交换、重新利用 ControlTemplate 中未使用的元素属性和/或样式的附加属性似乎阻碍了这种限制。

别介意这个限制背后的(可能很容易理解的)原因,请分享您对不可变的 Storyboard动画的经验ToFrom值(value)观。

最佳答案

在某些情况下只提供 ToBy value 解决了这个问题,因为动画将与当前值相关。

关于.net - 有哪些方法可用于在 Storyboard Animations 中使用非固定值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5690463/

相关文章:

.net - 集成FogBugz,它有哪些API/集成点?

c# - 控制台应用程序和单元测试方法之间的不同垃圾收集行为

c# - 在 ListView 中使用 Select Index 选择多行 - WPF (MVVM)

ios - 'NSInvalidUnarchiveOperationException',原因 : 'Could not instantiate class named MKMapView'

ios - 生成 ios Storyboard

.net - 覆盖 AuthorizeAttribute.AuthorizeCore 时为 "cannot set status after HTTP headers"

c# - 使用可选的减号解析 TimeSpan

c# - MultiBinding 转换器未绑定(bind)到 DataTemplate 中的 TextBlock

c# - 将语句 lambda 作为参数传递

ios - 使用 iOS Storyboard动态调整 UILabel 的高度