Monday, December 12, 2011

Introduction of using Windows Phone Toolkit vol.2 : Tilt effect











Introduction of using Windows Phone Toolkit vol.1 : Download and prepare to use toolkit
Introduction of using Windows Phone Toolkit vol.2 : Tilt effect
Introduction of using Windows Phone Toolkit vol.3 : Transitions
Introduction of using Windows Phone Toolkit vol.4 : ContextMenu
Introduction of using Windows Phone Toolkit vol.5 : List Picker



In this blog post, I show you tilt effect that is a motion of a object sinking down when you click it.
You can check the motion in bellow movie.






  • How coding
The function is the easiest to build in your app. You just add bellow tag into all of your xaml pages.

toolkit:TiltEffect.IsTiltEnabled="True"

 <phone:PhoneApplicationPage   
   x:Class="Memo.MainPage"  
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
   xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"  
   xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"  
   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  
   xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"  
   mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"  
   FontFamily="{StaticResource PhoneFontFamilyNormal}"  
   FontSize="{StaticResource PhoneFontSizeNormal}"  
   Foreground="{StaticResource PhoneForegroundBrush}"  
   SupportedOrientations="Portrait" Orientation="Portrait"  
   shell:SystemTray.IsVisible="True"  
   toolkit:TiltEffect.IsTiltEnabled="True">  

Also the bellow movie is my memo app using tilt effect in listbox.


No comments:

Post a Comment