MainPage.xaml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <phone:PhoneApplicationPage
  2. x:Class="WindowsPhoneRecipes.MainPage"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" FontFamily="{StaticResource PhoneFontFamilyNormal}"
  9. FontSize="{StaticResource PhoneFontSizeNormal}"
  10. Foreground="{StaticResource PhoneForegroundBrush}"
  11. SupportedOrientations="Portrait" Orientation="Portrait"
  12. mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
  13. shell:SystemTray.IsVisible="True">
  14. <!--Data context is set to sample data above and LayoutRoot contains the root grid where all other page content is placed-->
  15. <Grid x:Name="LayoutRoot" Background="Transparent">
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="Auto"/>
  18. <RowDefinition Height="*"/>
  19. </Grid.RowDefinitions>
  20. <!--TitlePanel contains the name of the application and page title-->
  21. <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
  22. <TextBlock x:Name="ApplicationTitle" Text="Windows Phone 7 Navigation Manager" Style="{StaticResource PhoneTextNormalStyle}"/>
  23. <TextBlock x:Name="PageTitle" Text="Main Menu" Margin="-3,-8,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
  24. </StackPanel>
  25. <!--ContentPanel contains ListBox and ListBox ItemTemplate. Place additional content here-->
  26. <StackPanel x:Name="ContentPanel" Grid.Row="1">
  27. <Button Content="Categories" Name="btnNext" Click="btnNext_Click" />
  28. <Button Content="Shopping Cart" IsEnabled="False" />
  29. <Button Content="Checkout" IsEnabled="False" />
  30. </StackPanel>
  31. <ScrollViewer x:Name="svLog" Visibility="Collapsed" Grid.Row="1">
  32. <TextBlock x:Name="txbLog" />
  33. </ScrollViewer>
  34. </Grid>
  35. <!--Sample code showing usage of ApplicationBar-->
  36. <phone:PhoneApplicationPage.ApplicationBar>
  37. <shell:ApplicationBar IsVisible="True" Opacity="0.98">
  38. <shell:ApplicationBarIconButton IconUri="/Images/LogIcon.png" Text="Log" Click="btnAppBarLog_Click"/>
  39. </shell:ApplicationBar>
  40. </phone:PhoneApplicationPage.ApplicationBar>
  41. </phone:PhoneApplicationPage>