Advertisement
Bick

CategoriesView.xaml

Feb 10th, 2012
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.09 KB | None | 0 0
  1. <phone:PhoneApplicationPage
  2.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.     xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  5.     xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  6.     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7.     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8.     xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  9.     xmlns:appbar="clr-namespace:AppBarUtils;assembly=AppBarUtils"
  10.     x:Class="Bick.Budget.Shell.Views.CategoriesView"
  11.     mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
  12.     FontFamily="{StaticResource PhoneFontFamilyNormal}"
  13.     FontSize="{StaticResource PhoneFontSizeNormal}"
  14.     Foreground="{StaticResource PhoneForegroundBrush}"
  15.     SupportedOrientations="Portrait" Orientation="Portrait"
  16.     shell:SystemTray.IsVisible="True">
  17.  
  18.     <!--Sample code showing usage of ApplicationBar-->
  19.     <phone:PhoneApplicationPage.ApplicationBar>
  20.         <shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Default">
  21.             <shell:ApplicationBarIconButton IconUri="/icons/appbar.add.rest.png" Text="add new"/>
  22.         </shell:ApplicationBar>
  23.     </phone:PhoneApplicationPage.ApplicationBar>
  24.     <i:Interaction.Behaviors>
  25.         <appbar:AppBarItemCommand Id="add new" Command="{Binding Path=AddCategoryCommand}"/>
  26.     </i:Interaction.Behaviors>
  27.     <!--LayoutRoot is the root grid where all page content is placed-->
  28.     <Grid x:Name="LayoutRoot" Background="Transparent">
  29.         <Grid.RowDefinitions>
  30.             <RowDefinition Height="Auto"/>
  31.             <RowDefinition Height="*"/>
  32.         </Grid.RowDefinitions>
  33.  
  34.         <!--TitlePanel contains the name of the application and page title-->
  35.         <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
  36.             <TextBlock x:Name="ApplicationTitle" Text="BUDGET" Style="{StaticResource PhoneTextNormalStyle}"/>
  37.             <TextBlock x:Name="PageTitle" Text="categories" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
  38.         </StackPanel>
  39.  
  40.         <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
  41.             <ListBox Margin="9,0,0,0" ItemsSource="{Binding Path=Categories}">
  42.                 <ListBox.ItemTemplate>
  43.                     <DataTemplate>
  44.                         <StackPanel Height="80" Width="447">
  45.                             <i:Interaction.Triggers>
  46.                                 <i:EventTrigger EventName="Tap">
  47.                                     <i:InvokeCommandAction Command="{Binding Path=ShowCategoryCommand}" CommandParameter="{Binding Path=ID}"/>
  48.                                 </i:EventTrigger>
  49.                             </i:Interaction.Triggers>
  50.                             <TextBlock TextWrapping="Wrap" Text="{Binding Path=Name}" FontSize="24" Margin="12,10,0,0" FontWeight="Bold"/>
  51.                             <TextBlock TextWrapping="Wrap" Text="{Binding Path=Type}" Margin="12,2,0,0" FontSize="16" Foreground="#FFCA2A2A"/>
  52.                         </StackPanel>                  
  53.                     </DataTemplate>        
  54.                 </ListBox.ItemTemplate>
  55.             </ListBox>
  56.         </Grid>
  57.     </Grid>
  58.  
  59. </phone:PhoneApplicationPage>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement