Friday, March 20, 2009

Silverlight 3.0 : 3D Page Turn Application

 

Hi All,

I am really excited since I am writing my First Blog. As every one know that Silverlight 3.0 is available in Beta now and Microsoft Expression Blend 3.0 Preview is available with that.

I was looking for 3D implementation and Silverlight 3.0 has the capability of 3D. So, I tried one application which I was trying from last one year that is “Page Turn Application”.

I always enjoy working with Expression Blend although I am not a designer. So here is a demo of Page Turn Application. I hope you will like it.

Silverlight 3.0 Page Turn Application

1) Create Silverlight 3.0 Application by Visual Studio 2008 and Open MainControl.Xaml File. Copy the bellow code in MainControl.Xaml file.

<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="PageTurnApplication.MainControl"

Width="640" Height="480" mc:Ignorable="d">
<UserControl.Resources>
<Storyboard x:Name="NextPage1Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img1" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="NextPage2Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">

<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img2" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="NextPage3Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img2"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img3" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="NextPage4Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img2"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img3"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img4" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="NextPage5Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img2"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img3"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img4"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img5" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="NextPage6Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img2"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img3"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img4"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img5"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img6" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="PagePrevious1Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img5"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img4"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img3"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img2"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img6" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="PagePrevious2Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img5" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img4"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img3"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img2"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="PagePrevious3Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img4" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img3"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img2"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="PreviousPage4Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img3" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img2"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="PagePrevious5Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img2" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Duration="00:00:00.0010000" Storyboard.TargetName="Img1"
Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Name="PagePrevoius6Ani">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="Img1" Storyboard.TargetProperty="(UIElement.Projection).
(PlaneProjection.RotationY)"
>
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
<EasingDoubleKeyFrame KeyTime="00:00:04" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>

<Grid x:Name="LayoutRoot" Background="Black">
<Image x:Name="nxtButton" HorizontalAlignment="Right"
Margin="0,219,203,211" Width="50" Source="Next.png" Stretch="Fill"
MouseLeftButtonDown="nxtButton_MouseLeftButtonDown"/>
<Image x:Name="prevButton" HorizontalAlignment="Left" Margin="50,219,0,211"
Width="50" Source="Previous.png" Stretch="Fill"
MouseLeftButtonDown="prevButton_MouseLeftButtonDown" />
<Image x:Name="Img6" Margin="251,83,189,297" Source="Waterfall.jpg"
Stretch="Fill" Height="100">
<Image.Projection>
<PlaneProjection CenterOfRotationY="10" CenterOfRotationX="0"
RotationY="0"/>
</Image.Projection>
</Image>
<Image x:Name="Img5" Margin="251,83,189,297" Source="leaves.jpg"
Stretch="Fill" Height="100">
<Image.Projection>
<PlaneProjection CenterOfRotationY="10" CenterOfRotationX="0"
RotationY="0"/>
</Image.Projection>
</Image>
<Image x:Name="Img4" Margin="251,83,189,297" Source="Tulip.jpg"
Stretch="Fill" Height="100">
<Image.Projection>
<PlaneProjection CenterOfRotationY="10" CenterOfRotationX="0"
RotationY="0"/>
</Image.Projection>
</Image>
<Image x:Name="Img3" Margin="251,83,189,297" Source="Creek.jpg"
Stretch="Fill" Height="100">
<Image.Projection>
<PlaneProjection CenterOfRotationY="10" CenterOfRotationX="0"
RotationY="0"/>
</Image.Projection>
</Image>
<Image x:Name="Img2" Margin="251,83,189,297" Source="Butterfly.jpg"
Stretch="Fill" Height="100">
<Image.Projection>
<PlaneProjection CenterOfRotationY="10" CenterOfRotationX="0"
RotationY="0"/>
</Image.Projection>
</Image>
<Image x:Name="Img1" Margin="251,83,189,297" Source="Flower.jpg"
Stretch="Fill" Height="100">
<Image.Projection>
<PlaneProjection CenterOfRotationY="10" CenterOfRotationX="0"
RotationY="0"/>
</Image.Projection>
</Image>
<Image Margin="0,-55,264.464,0" Source="Borders.png" Stretch="Fill"
RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto" UseLayoutRounding="False"
VerticalAlignment="Top" Height="239" Width="17.072" HorizontalAlignment="Right">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<Image Margin="0,82.75,264.464,158.25" Source="Borders.png" Stretch="Fill"
RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto" UseLayoutRounding="False"
HorizontalAlignment="Right" Width="17.072">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<Image Margin="120.464,-55,0,0" Source="Borders.png" Stretch="Fill"
RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto" UseLayoutRounding="False"
VerticalAlignment="Top" Height="239" HorizontalAlignment="Left" Width="17.072">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<Image Margin="120.464,82.75,0,158.25" Source="Borders.png" Stretch="Fill"
RenderTransformOrigin="0.5,0.5" d:LayoutRounding="Auto" UseLayoutRounding="False"
HorizontalAlignment="Left" Width="17.072">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
</Image>
</Grid>
</UserControl>





2) Now Let’s Start coding MainControl.xaml.cs file as shown bellow-




public partial class MainControl : UserControl
{
public MainControl()
{
// Required to initialize variables
InitializeComponent();
prevButton.Visibility = Visibility.Collapsed;
}
private void resetZIndexNormal()
{

Canvas.SetZIndex(Img6, 11);
Canvas.SetZIndex(Img5, 12);
Canvas.SetZIndex(Img4, 13);
Canvas.SetZIndex(Img3, 14);
Canvas.SetZIndex(Img2, 15);
Canvas.SetZIndex(Img1, 16);

}
private void resetZIndexReverse()
{

Canvas.SetZIndex(Img1, 31);
Canvas.SetZIndex(Img2, 32);
Canvas.SetZIndex(Img3, 33);
Canvas.SetZIndex(Img4, 34);
Canvas.SetZIndex(Img5, 35);
Canvas.SetZIndex(Img6, 36);

}
static int nextCount=1,previousCount=1;
bool reverse = false;
private void nxtButton_MouseLeftButtonDown(object sender,
MouseButtonEventArgs e)
{
if (reverse == false)
{
resetZIndexNormal();
reverse = true;
}

switch (nextCount)
{
case 1:

NextPage1Ani.Stop();
NextPage1Ani.Begin();
nextCount++;
Canvas.SetZIndex(Img1, 21);
break;
case 2:

NextPage2Ani.Stop();
NextPage2Ani.Begin();
nextCount++;
Canvas.SetZIndex(Img2, 22);
break;
case 3:

NextPage3Ani.Stop();
NextPage3Ani.Begin();
nextCount++;
Canvas.SetZIndex(Img3, 23);
break;
case 4:

NextPage4Ani.Stop();
NextPage4Ani.Begin();
nextCount++;
Canvas.SetZIndex(Img4, 24);
break;
case 5:

NextPage5Ani.Stop();
NextPage5Ani.Begin();
nextCount++;
Canvas.SetZIndex(Img5, 25);
break;
case 6:

NextPage6Ani.Stop();
NextPage6Ani.Begin();
nextCount++;
Canvas.SetZIndex(Img6, 26);
nextCount=1;
nxtButton.Visibility = Visibility.Collapsed;
prevButton.Visibility = Visibility.Visible;
reverse = true;
break;

}
}


private void prevButton_MouseLeftButtonDown(object sender,
MouseButtonEventArgs e)
{
if (reverse == true)
{
resetZIndexReverse();
reverse = false;

}
switch (previousCount)
{
case 1:

PagePrevious1Ani.Stop();
PagePrevious1Ani.Begin();
previousCount++;
Canvas.SetZIndex(Img6, 41);
break;
case 2:

PagePrevious2Ani.Stop();
PagePrevious2Ani.Begin();
previousCount++;
Canvas.SetZIndex(Img5, 42);
break;
case 3:

PagePrevious3Ani.Stop();
PagePrevious3Ani.Begin();
previousCount++;
Canvas.SetZIndex(Img4, 43);
break;
case 4:

PreviousPage4Ani.Stop();
PreviousPage4Ani.Begin();
previousCount++;
Canvas.SetZIndex(Img3, 44);
break;
case 5:

PagePrevious5Ani.Stop();
PagePrevious5Ani.Begin();
previousCount++;
Canvas.SetZIndex(Img2, 45);
break;
case 6:

PagePrevoius6Ani.Stop();
PagePrevoius6Ani.Begin();
previousCount++;
Canvas.SetZIndex(Img1, 46);
previousCount=1;
nxtButton.Visibility = Visibility.Visible;
prevButton.Visibility = Visibility.Collapsed;
reverse = false;

break;
}
}
}





Enjoy !!!

6 comments:

  1. hiiiiiiiii
    I very like this App. I am a new student in Silverlight, so Can You can post soucecode for me to refer?
    Thank!

    ReplyDelete
  2. I very like your App.Can you post code of this App, please? I need Page turn of Silverlight 3.0.
    Thanks!

    ReplyDelete
  3. Hi Yen,

    I am extremly sorry. I really don't have a way to publish the code. It is not supported. Please share your e-Mail id . I will try to share the code !!

    ReplyDelete
  4. Thats cool. I like it very much. Could you send me the Turn Page of Silverlight 3 source code. Thanks.

    ReplyDelete
  5. Hi Kahraman,

    Thanks for your comments. The complete source code is there in post. But, still I will send you the complete source code.

    Thanks!! Pravin!

    ReplyDelete
  6. Hi Pravinkumar , this app is fantastic . I used this code but it can't work. Could you please send me your whole Source code ? thanks .

    ReplyDelete