[Windows Phone] 为Listbox添加、删除item注入动画效果,并伴随Layout迁移动画

[Windows Phone] 为Listbox添加、删除item注入动画效果,并伴随Layout迁移动画

 

作者:sinodragon21/Nathan

 

转载请注明出处 http://www.cnblogs.com/sinodragon21/archive/2012/07/20/2601072.html 

 

一、Demo截图

 

   

 

二、核心代码

复制代码
 1 <ListBox Grid.Row="0" x:Name="mylistbox">
 2                 <ListBox.ItemsPanel>
 3                     <ItemsPanelTemplate>
 4                         <toolkit:WrapPanel x:Name="ListBoxItemPanel" Loaded="ListBoxItemPanel_Loaded" ItemHeight="87" ItemWidth="87">
 5                             <i:Interaction.Behaviors>
 6                                 <el:FluidMoveBehavior AppliesTo="Children" Duration="0:0:1.5">
 7                                     <el:FluidMoveBehavior.EaseY>
 8                                         <CubicEase EasingMode="EaseOut"/>
 9                                     </el:FluidMoveBehavior.EaseY>
10                                     <el:FluidMoveBehavior.EaseX>
11                                         <CubicEase EasingMode="EaseOut"/>
12                                     </el:FluidMoveBehavior.EaseX>
13                                 </el:FluidMoveBehavior>
14                             </i:Interaction.Behaviors>
15                         </toolkit:WrapPanel>
16                     </ItemsPanelTemplate>
17                 </ListBox.ItemsPanel>
18                 <Border Height="75" Width="75" Background="Red" Margin="12,12,0,0" BorderBrush="White" BorderThickness="2" />
19                 <Border Height="75" Width="75" Background="#FF665050" Margin="12,12,0,0" BorderBrush="White" BorderThickness="2" />
20                 <Border Height="75" Width="75" Background="Red" Margin="12,12,0,0" BorderBrush="White" BorderThickness="2" />
21                 <Border Height="75" Width="75" Background="#FF19A588" Margin="12,12,0,0" BorderBrush="White" BorderThickness="2" />
22                 <Border Height="75" Width="75" Background="Red" Margin="12,12,0,0" BorderBrush="White" BorderThickness="2" />
23                 <Border Height="75" Width="75" Background="#FF852121" Margin="12,12,0,0" BorderBrush="White" BorderThickness="2" />
24                 <Border Height="75" Width="75" Background="#FF19C854" Margin="12,12,0,0" BorderBrush="White" BorderThickness="2" />
25                 <Border Height="75" Width="75" Background="#FFA19595" Margin="12,12,0,0" BorderBrush="White" BorderThickness="2" />
26</ListBox>
复制代码

 

三、源代码下载

http://www.hugwp.com/thread-4207-1.html

 

-完。

 

posted @   sinodragon21  阅读(849)  评论(0编辑  收藏  举报
编辑推荐:
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
点击右上角即可分享
微信分享提示