【问题标题】:Binding animation duration to slider将动画持续时间绑定到滑块
【发布时间】:2013-07-19 17:07:27
【问题描述】:

在我的 MainPage 我有

<DoubleAnimation Completed="DoubleAnimation_Completed_1" 
            Storyboard.TargetName="factImage"
            Storyboard.TargetProperty="Opacity"
            From="0.0" To="1.0" Duration="0:0:0.3"
            AutoReverse="False"/>

而不是硬编码 Duration="0:0:0.3" ,我想将它绑定到 设置 页面上的滑块。

【问题讨论】:

    标签: silverlight windows-phone-7 animation data-binding


    【解决方案1】:

    您可以使用两个页面都使用的 ViewModel。

    例如,您可以拥有一个带有 Duration 属性的 ViewModel,该属性由 Settings 页面通过绑定设置,但随后也绑定到 MaingPage 中的动画。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-19
      • 1970-01-01
      • 2019-01-28
      • 1970-01-01
      • 2018-06-15
      • 2014-03-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多