MainPage.xaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <phone:PhoneApplicationPage
  2. x:Class="TwitterSearch.WindowsPhone.MainPage"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  6. xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. mc:Ignorable="d"
  10. FontFamily="{StaticResource PhoneFontFamilyNormal}"
  11. FontSize="{StaticResource PhoneFontSizeNormal}"
  12. Foreground="{StaticResource PhoneForegroundBrush}"
  13. SupportedOrientations="Portrait" Orientation="Portrait"
  14. shell:SystemTray.IsVisible="True">
  15. <!--LayoutRoot is the root grid where all page content is placed-->
  16. <Grid x:Name="LayoutRoot" Background="Transparent">
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="Auto"/>
  19. <RowDefinition Height="*"/>
  20. </Grid.RowDefinitions>
  21. <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
  22. <TextBlock Text="Twitter Search" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
  23. </StackPanel>
  24. <!--ContentPanel - place additional content here-->
  25. <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
  26. <Grid.ColumnDefinitions>
  27. <ColumnDefinition Width="*"/>
  28. <ColumnDefinition Width="Auto"/>
  29. </Grid.ColumnDefinitions>
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="Auto"/>
  32. <RowDefinition Height="*"/>
  33. </Grid.RowDefinitions>
  34. <TextBox x:Name="TextBoxSearch" Text="XamarinDevDays"/>
  35. <Button x:Name="ButtonSearch" Grid.Column="1" Content="Get Tweets" Click="ButtonSearch_Click"/>
  36. <ListBox x:Name="Tweets" Grid.Row="1" Grid.ColumnSpan="2" SelectionChanged="Tweets_SelectionChanged">
  37. <ListBox.ItemTemplate>
  38. <DataTemplate>
  39. <Grid>
  40. <Grid.ColumnDefinitions>
  41. <ColumnDefinition Width="88"/>
  42. <ColumnDefinition Width="*"/>
  43. </Grid.ColumnDefinitions>
  44. <Image Width="88" Height="88" Source="{Binding Image}"/>
  45. <StackPanel Margin="5" Grid.Column="1">
  46. <TextBlock Text="{Binding ScreenName}"/>
  47. <TextBlock Text="{Binding Date}"/>
  48. <TextBlock Text="{Binding Text}" TextWrapping="Wrap"/>
  49. </StackPanel>
  50. </Grid>
  51. </DataTemplate>
  52. </ListBox.ItemTemplate>
  53. </ListBox>
  54. </Grid>
  55. <!--Uncomment to see an alignment grid to help ensure your controls are
  56. aligned on common boundaries. The image has a top margin of -32px to
  57. account for the System Tray. Set this to 0 (or remove the margin altogether)
  58. if the System Tray is hidden.
  59. Before shipping remove this XAML and the image itself.-->
  60. <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
  61. <ProgressBar x:Name="Progress" IsIndeterminate="True" VerticalAlignment="Bottom" Visibility="Collapsed"/>
  62. </Grid>
  63. </phone:PhoneApplicationPage>