【发布时间】:2015-04-27 08:04:30
【问题描述】:
我有一组放置在枢轴控件中的图像。我想将图像放大到特定点,然后通过动画恢复到正常大小。我该怎么做。任何帮助将不胜感激。
<StackPanel>
<StackPanel.Resources>
<Storyboard x:Name="story">
<DoubleAnimation Storyboard.TargetName="img"
Storyboard.TargetProperty="Height"
From="300"
To="600"
Duration="0:0:2">
</DoubleAnimation>
</Storyboard>
</StackPanel.Resources>
<Button Height="100" Width="100" Click="Button_Click"></Button>
<Image x:Name="img" Height="300" Width="200" Source="/Assets/10.png"></Image>
</StackPanel>
【问题讨论】:
-
请输入一些代码..你试过什么?
-
我使用上面的代码@MayankJain
-
这不是我想要的@Pradnya Bolli
-
你想在页面渲染时看到动画,还是在某个事件时看到动画?
-
当某个事件被触发时@user2784555
标签: c# xaml animation windows-phone-8