MainView.xaml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <views:MvxWindowsPage
  2. x:Class="FormulaOneApp.Classic.Windows.Views.MainView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:views="using:Cirrious.MvvmCross.WindowsCommon.Views"
  8. xmlns:tile="using:FormulaOneApp.Classic.Windows.Controls.Tile"
  9. xmlns:animations="using:FormulaOneApp.Classic.Windows.Controls.Tile.Animations"
  10. mc:Ignorable="d"
  11. Background="{StaticResource WhiteBrush}"
  12. Foreground="{StaticResource BlackBrush}">
  13. <Grid>
  14. <Hub
  15. Header="Formula One"
  16. HeaderTemplate="{StaticResource HubHeaderDataTemplate}">
  17. <HubSection Header="Events"
  18. HeaderTemplate="{StaticResource HubSectionHeaderDataTemplate}">
  19. <DataTemplate>
  20. <Grid>
  21. <Image
  22. Source="{Binding NextRace.Round, Converter={StaticResource EventToImageConverter}}"
  23. Stretch="UniformToFill" />
  24. <Grid
  25. Background="{StaticResource AccentBrush}"
  26. VerticalAlignment="Bottom">
  27. <StackPanel
  28. Margin="15, 50">
  29. <TextBlock
  30. Text="{Binding NextRace.RaceName}"
  31. Foreground="{StaticResource WhiteBrush}"
  32. FontSize="48"/>
  33. <TextBlock
  34. Text="{Binding NextRace.Date}"
  35. Foreground="{StaticResource WhiteBrush}"
  36. FontSize="32"/>
  37. </StackPanel>
  38. </Grid>
  39. </Grid>
  40. </DataTemplate>
  41. </HubSection>
  42. <HubSection Header="News"
  43. HeaderTemplate="{StaticResource HubSectionHeaderDataTemplate}">
  44. <DataTemplate>
  45. <Grid>
  46. <ListView
  47. ItemsSource="{Binding News}"
  48. ItemTemplate="{StaticResource NewDataTemplate}" />
  49. </Grid>
  50. </DataTemplate>
  51. </HubSection>
  52. <HubSection Header="Sections"
  53. HeaderTemplate="{StaticResource HubSectionHeaderDataTemplate}">
  54. <DataTemplate>
  55. <Grid>
  56. <Grid.ColumnDefinitions>
  57. <ColumnDefinition Width="225" />
  58. <ColumnDefinition Width="225" />
  59. </Grid.ColumnDefinitions>
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="225" />
  62. <RowDefinition Height="225" />
  63. </Grid.RowDefinitions>
  64. <tile:Tile
  65. Command="{Binding StandingsCommand}"
  66. Grid.Column="0"
  67. Grid.Row="0"
  68. IsAnimationEnabled="True"
  69. Height="220"
  70. Width="220"
  71. Background="{StaticResource AccentBrush}"
  72. tile:TiltEffect.IsTiltEnabled="True">
  73. <tile:Tile.FrontContent>
  74. <Grid HorizontalAlignment="Stretch"
  75. VerticalAlignment="Stretch">
  76. <Grid.RowDefinitions>
  77. <RowDefinition Height="200" />
  78. <RowDefinition Height="*" />
  79. </Grid.RowDefinitions>
  80. <Image
  81. Source="ms-appx:///Assets/Icons/Standings.png" />
  82. <TextBlock Grid.Row="1"
  83. Text="Standings"
  84. Foreground="{StaticResource WhiteBrush}"
  85. FontSize="18"
  86. HorizontalAlignment="Center" />
  87. </Grid>
  88. </tile:Tile.FrontContent>
  89. <tile:Tile.TileAnimation>
  90. <animations:LeftAnimationTile />
  91. </tile:Tile.TileAnimation>
  92. </tile:Tile>
  93. <tile:Tile
  94. Command="{Binding DriversCommand}"
  95. Grid.Column="1"
  96. Grid.Row="0"
  97. IsAnimationEnabled="True"
  98. Height="220"
  99. Width="220"
  100. Background="{StaticResource AccentBrush}"
  101. tile:TiltEffect.IsTiltEnabled="True">
  102. <tile:Tile.FrontContent>
  103. <Grid HorizontalAlignment="Stretch"
  104. VerticalAlignment="Stretch">
  105. <Grid.RowDefinitions>
  106. <RowDefinition Height="200" />
  107. <RowDefinition Height="*" />
  108. </Grid.RowDefinitions>
  109. <Image
  110. Source="ms-appx:///Assets/Icons/Driver.png" />
  111. <TextBlock Grid.Row="1"
  112. Text="Drivers"
  113. Foreground="{StaticResource WhiteBrush}"
  114. FontSize="18"
  115. HorizontalAlignment="Center" />
  116. </Grid>
  117. </tile:Tile.FrontContent>
  118. <tile:Tile.TileAnimation>
  119. <animations:RightTileAnimation />
  120. </tile:Tile.TileAnimation>
  121. </tile:Tile>
  122. <tile:Tile
  123. Grid.Column="0"
  124. Grid.Row="1"
  125. IsAnimationEnabled="True"
  126. Height="220"
  127. Width="220"
  128. Background="{StaticResource AccentBrush}"
  129. tile:TiltEffect.IsTiltEnabled="True">
  130. <tile:Tile.FrontContent>
  131. <Grid HorizontalAlignment="Stretch"
  132. VerticalAlignment="Stretch">
  133. <Grid.RowDefinitions>
  134. <RowDefinition Height="200" />
  135. <RowDefinition Height="*" />
  136. </Grid.RowDefinitions>
  137. <Image
  138. Source="ms-appx:///Assets/Icons/Scuderias.png" />
  139. <TextBlock Grid.Row="1"
  140. Text="Scuderias"
  141. Foreground="{StaticResource WhiteBrush}"
  142. FontSize="18"
  143. HorizontalAlignment="Center" />
  144. </Grid>
  145. </tile:Tile.FrontContent>
  146. <tile:Tile.TileAnimation>
  147. <animations:RotationVerticalTileAnimation />
  148. </tile:Tile.TileAnimation>
  149. </tile:Tile>
  150. <tile:Tile
  151. Command="{Binding CircuitsCommand}"
  152. Grid.Column="1"
  153. Grid.Row="1"
  154. IsAnimationEnabled="True"
  155. Height="220"
  156. Width="220"
  157. Background="{StaticResource AccentBrush}"
  158. tile:TiltEffect.IsTiltEnabled="True">
  159. <tile:Tile.FrontContent>
  160. <Grid HorizontalAlignment="Stretch"
  161. VerticalAlignment="Stretch">
  162. <Grid.RowDefinitions>
  163. <RowDefinition Height="200" />
  164. <RowDefinition Height="*" />
  165. </Grid.RowDefinitions>
  166. <Image
  167. Source="ms-appx:///Assets/Icons/Circuit.png" />
  168. <TextBlock Grid.Row="1"
  169. Text="Circuits"
  170. Foreground="{StaticResource WhiteBrush}"
  171. FontSize="18"
  172. HorizontalAlignment="Center" />
  173. </Grid>
  174. </tile:Tile.FrontContent>
  175. <tile:Tile.TileAnimation>
  176. <animations:RotationHorizontalTileAnimation />
  177. </tile:Tile.TileAnimation>
  178. </tile:Tile>
  179. </Grid>
  180. </DataTemplate>
  181. </HubSection>
  182. </Hub>
  183. </Grid>
  184. </views:MvxWindowsPage>