[Windows Phone] 為Listbox添加、刪除item注入動畫效果,並伴隨Layout遷移動畫

來源:互聯網
上載者:User

[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

 

-完。

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.