Windows phone 7 如何在stackPanel wp7中设置图像动画
我开发了一些windows phone应用程序,但从未与Windows phone 7 如何在stackPanel wp7中设置图像动画,windows-phone-7,xaml,animation,storyboard,Windows Phone 7,Xaml,Animation,Storyboard,我开发了一些windows phone应用程序,但从未与动画进行过交互 现在我需要一个平铺中的动画,下面给出了xaml <Grid Height="250"> <StackPanel Height="700" x:Name="stackPanel" VerticalAlignment="bottom"> <Image Width="50" Height="50"
动画进行过交互
现在我需要一个平铺中的动画,下面给出了xaml
<Grid Height="250">
<StackPanel Height="700" x:Name="stackPanel" VerticalAlignment="bottom">
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_f6bce20b-cb91-41d8-80fb-36524e1e6e46_ProfilePic.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_0b3b5606-8cf3-4a33-8292-e62f7785a224_tes.JPG"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_1c59768b-3419-48e4-805b-e78ca8d82b71_d.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_f6bce20b-cb91-41d8-80fb-36524e1e6e46_ProfilePic.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_0b3b5606-8cf3-4a33-8292-e62f7785a224_tes.JPG"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_1c59768b-3419-48e4-805b-e78ca8d82b71_d.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_f6bce20b-cb91-41d8-80fb-36524e1e6e46_ProfilePic.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_0b3b5606-8cf3-4a33-8292-e62f7785a224_tes.JPG"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_1c59768b-3419-48e4-805b-e78ca8d82b71_d.jpg"></Image>
</StackPanel>
</Grid>
在上面的网格(高度=250)
包含一个堆栈面板(高度=500)
,其中包含一些图像,但是网格的高度小于堆栈面板的高度,因此堆栈面板中的所有图像都不能同时显示,因此,我想向上/向下旋转堆叠面板,下面给出了更具说明性的图表
<Grid Height="250">
<StackPanel Height="700" x:Name="stackPanel" VerticalAlignment="bottom">
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_f6bce20b-cb91-41d8-80fb-36524e1e6e46_ProfilePic.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_0b3b5606-8cf3-4a33-8292-e62f7785a224_tes.JPG"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_1c59768b-3419-48e4-805b-e78ca8d82b71_d.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_f6bce20b-cb91-41d8-80fb-36524e1e6e46_ProfilePic.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_0b3b5606-8cf3-4a33-8292-e62f7785a224_tes.JPG"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_1c59768b-3419-48e4-805b-e78ca8d82b71_d.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_f6bce20b-cb91-41d8-80fb-36524e1e6e46_ProfilePic.jpg"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_0b3b5606-8cf3-4a33-8292-e62f7785a224_tes.JPG"></Image>
<Image Width="50" Height="50" Stretch="Fill" Source="http://localhost:5141/Images/28/28_1c59768b-3419-48e4-805b-e78ca8d82b71_d.jpg"></Image>
</StackPanel>
</Grid>
有什么需要感谢的吗?
感谢对于这种情况,使用ItemsControl子类(如ListView)比使用Grid和StackPanel更为常见。ListView可能使用StackPanel(或者更可能是VirtualzingStackPanel)作为其ItemsContainer。