繁体   English   中英

C#Windows Phone 7:通过DataTemplate创建的动画ListBoxItems

[英]C# windows phone 7: Animating ListBoxItems created via DataTemplate

我有这个xaml:

<ListBox Margin="12,0,0,0" Height="50" FontSize="30" Name="resultListBox">
  <ListBox.ItemTemplate>
    <DataTemplate>
      <toolkit:WrapPanel Margin="0,0,24,0" Background="{Binding Path=background}" Orientation="Horizontal" HorizontalAlignment="Stretch">
        <TextBlock Margin="0,0,12,0" Width="49" Text="{Binding Path=line}" />
        <TextBlock Width="261" Text="{Binding Path=destination}" />
        <TextBlock Margin="0,0,12,0" Width="49" Text="{Binding Path=next}" />
        <TextBlock  Width="49" Text="{Binding Path=nextNext}" />
        <toolkit:WrapPanel.Projection>
          <PlaneProjection CenterOfRotationY="0.5" x:Name="WrapPanelPP{Binding Path=ID}" RotationX="-90" />
        </toolkit:WrapPanel.Projection>
      </toolkit:WrapPanel>
    </DataTemplate>
  </ListBox.ItemTemplate>

我想为每个项目的平面投影设置动画。 怎么办

谢谢!

有两种可能的方法可以解决此问题。

  1. 使用Expression Blend创建情节提要,并在适当的触发条件下调用情节提要。 要么
  2. 在后面的代码中,您可以创建情节提要的实例,并在项目上定位“(UIElement.Projection)。(RotationX)”属性。


暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM