How I built a Portrait Book.

Category: windows phone howto


ken roberts1 on Thu, 24 May 2012 20:51:58

This was built using Microsoft Visual Studio Visual Basic
MainPage.xaml code:


SupportedOrientations="Portrait" Orientation="Portrait"   
<!--LayoutRoot is the root grid where all page content is placed-->   
<Grid x:Name="LayoutRoot" Background="BurlyWood">   
<Image Height="650" Name="photo1" Stretch="Fill" Width="460"   
VerticalAlignment="Top" Source="1.jpg" />   
<Button Height="100" HorizontalAlignment="Center" Margin="0,660,0,0"   
x:Name="StartButton" VerticalAlignment="Center"   
Width="200" FontSize="32" Foreground="Black"   
Click="StartButton_Click" Content="Page 1" />   




MainPage.xaml.vb code:

Private Sub StartButton_Click(ByVal sender As ObjectByVal e As RoutedEventArgs)   
New Uri("/Page1.xaml", UriKind.RelativeOrAbsolute))   
End Sub   

For the rest of the pages of the book I just copyed and pasted code from Page to page
I just had to change the 1.jpg in the image code to 2.jpg and the button Content="Page 1" to
Content="Page 2". On the vb page you just got to remember to change "/Page1.xaml" to "/Page2.xaml"
As I was displaying art I didn't need to use many words, the words I did use was inside the jpg files.