Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.82 KB | None | 0 0
  1. <Page
  2. x:Class="Namespace.Page"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:local="using:Namespace"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:ViewModels="Namespace.ViewModels"
  9. xmlns:q42controls="using:Q42.WinRT.Controls"
  10. mc:Ignorable="d">
  11.  
  12. <Page.Resources>
  13. <ViewModels:ViewModel x:Key="ViewModel" />
  14. <DataTemplate x:Key="headerTemplate">
  15. <TextBlock Text="{Binding Title}" FontSize="16"/>
  16. </DataTemplate>
  17. <DataTemplate x:Key="pivotTemplate">
  18. <ListView x:Name="listView" Background="White" ItemsSource="{Binding Articles}"
  19. HorizontalAlignment="Left" Margin="-25 0 -25 0" SelectionChanged="getIndex">
  20. <ListView.ItemTemplate>
  21. <DataTemplate>
  22. <StackPanel Tapped="StackPanel_Tapped">
  23. <Grid>
  24. <Grid.Background>
  25. <ImageBrush AlignmentX="Center" AlignmentY="Center" ImageSource="Assets/PlaceHolder.jpg"></ImageBrush>
  26. </Grid.Background>
  27. <Image x:Name="ArticleImage" q42controls:ImageExtensions.CacheUri="{Binding ImageURL}"></Image>
  28. </Grid>
  29. <StackPanel>
  30. <TextBlock x:Name="HeadLine" Text="{Binding HeadLine}"
  31. Margin="10 5 10 -5" TextWrapping="Wrap"
  32. FontSize="20"
  33. FontFamily="{StaticResource HeadlineCommonFamiy}"
  34. Pivot.SlideInAnimationGroup="GroupTwo"
  35. FontWeight="Bold" TextTrimming="CharacterEllipsis" Height="63"/>
  36.  
  37. <TextBlock Text="{Binding Abstract}" TextWrapping="Wrap" FontSize="15"
  38. Pivot.SlideInAnimationGroup="GroupTwo" Margin="10 5 0 10"
  39. FontFamily="{StaticResource AbstractCommonFamily}"/>
  40. </StackPanel>
  41. </StackPanel>
  42. </DataTemplate>
  43. </ListView.ItemTemplate>
  44. </ListView>
  45. </DataTemplate>
  46. </Page.Resources>
  47.  
  48. <Page.BottomAppBar>
  49. <CommandBar Foreground="Black" ClosedDisplayMode="Minimal" Background="White">
  50. <CommandBar.PrimaryCommands>
  51. <AppBarButton x:Uid="Refresh" Icon="Refresh" Label="Refresh" Tapped="RefreshButton_Tapped"/>
  52. </CommandBar.PrimaryCommands>
  53. <CommandBar.SecondaryCommands>
  54. <AppBarButton x:Uid="Favourites" Icon="Favorite" Label="Favourites" Tapped="Favourites_Tapped"/>
  55. <AppBarButton x:Uid="Settings" Icon="Setting" Label="Settings" Tapped="Settings_Tapped"/>
  56. </CommandBar.SecondaryCommands>
  57. </CommandBar>
  58. </Page.BottomAppBar>
  59.  
  60. <Grid Style="{StaticResource MyGridStyle}">
  61. <Grid x:Name="LoadingGrid" Visibility="Visible">
  62. <ProgressRing x:Name="progressRing" IsActive="True" Foreground="White" HorizontalAlignment="Center" Width="60"
  63. Height="50" VerticalAlignment="Center" Margin="0 20 0 0"></ProgressRing>
  64. </Grid>
  65.  
  66. <Grid>
  67. <Grid.RowDefinitions>
  68. <RowDefinition Height="60"></RowDefinition>
  69. <RowDefinition Height="45"></RowDefinition>
  70. <RowDefinition Height="*"></RowDefinition>
  71. </Grid.RowDefinitions>
  72.  
  73. <Grid Grid.Row="0">
  74. <Image Source="Assets/_logo.png" HorizontalAlignment="Center" Margin="1 5 0 0"></Image>
  75. </Grid>
  76.  
  77. <Grid Grid.Row="1">
  78. <Grid.ColumnDefinitions>
  79. <ColumnDefinition Width="50"></ColumnDefinition>
  80. <ColumnDefinition Width="*"></ColumnDefinition>
  81. </Grid.ColumnDefinitions>
  82. <Grid Grid.Column="0">
  83. <Button x:Name="HamburgerButton" FontFamily="Segoe MDL2 Assets" Content="&#xE700;"
  84. Width="60" Height="60" Background="Transparent" Margin="-10 -20 0 0"
  85. Click="HamburgerButton_Click" Foreground="White"/>
  86. </Grid>
  87. <Grid Grid.Column="1">
  88. <TextBlock Text="சினிமா" HorizontalAlignment="Center" FontSize="30"
  89. Margin="-50 0 0 0" Foreground="White"></TextBlock>
  90. </Grid>
  91. </Grid>
  92.  
  93. <Grid Grid.Row="2" x:Name="galleryGrid" Visibility="Collapsed">
  94. <SplitView x:Name="MySplitView" DisplayMode="CompactOverlay" IsPaneOpen="False"
  95. CompactPaneLength="0" OpenPaneLength="220">
  96. <SplitView.Pane>
  97. <ListView x:Name="menuBindList" Style="{StaticResource MyListViewStyle}">
  98. <ListView.ItemTemplate>
  99. <DataTemplate>
  100. <StackPanel>
  101. <StackPanel Orientation="Horizontal" Tag="{Binding SectionName}">
  102. <TextBlock Text="{Binding TitleofAccess}"
  103. Tag="{Binding SectionName}" FontSize="18"
  104. VerticalAlignment="Center" Foreground="White" Tapped="MenuTextBlock_Tapped" />
  105. </StackPanel>
  106. </StackPanel>
  107. </DataTemplate>
  108. </ListView.ItemTemplate>
  109. </ListView>
  110. </SplitView.Pane>
  111. <SplitView.Content>
  112. <ScrollViewer Name="cinemaScroll">
  113. <Pivot DataContext="{StaticResource ViewModel}" x:Name="galleryPivot"
  114. HeaderTemplate="{StaticResource headerTemplate}"
  115. ItemTemplate="{StaticResource pivotTemplate}" ItemsSource="{Binding Feeds}"
  116. Margin="0,-10,0,10" SelectionChanged="galleryPivot_SelectionChanged">
  117.  
  118. <Pivot.Resources>
  119. <Style TargetType="PivotHeaderItem">
  120. <Setter Property="CharacterSpacing" Value="{ThemeResource PivotHeaderItemCharacterSpacing}" />
  121. <Setter Property="Background" Value="Transparent" />
  122. <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
  123. <Setter Property="Padding" Value="{ThemeResource PivotHeaderItemMargin}" />
  124.  
  125. <Setter Property="VerticalContentAlignment" Value="Center" />
  126. <Setter Property="IsTabStop" Value="False" />
  127. <Setter Property="RequestedTheme" Value="Dark" />
  128. <Setter Property="Template">
  129. <Setter.Value>
  130. <ControlTemplate TargetType="PivotHeaderItem">
  131. <Grid
  132. x:Name="Grid"
  133. Background="{TemplateBinding Background}">
  134. <Grid.Resources>
  135. <Style x:Key="BaseContentPresenterStyle" TargetType="ContentPresenter">
  136. <Setter Property="FontFamily" Value="Segoe UI"/>
  137. <Setter Property="FontWeight" Value="SemiBold"/>
  138. <Setter Property="FontSize" Value="15"/>
  139. <Setter Property="TextWrapping" Value="Wrap"/>
  140. <Setter Property="LineStackingStrategy" Value="MaxHeight"/>
  141. <Setter Property="TextLineBounds" Value="Full"/>
  142. <Setter Property="OpticalMarginAlignment" Value="TrimSideBearings"/>
  143. </Style>
  144. <Style x:Key="BodyContentPresenterStyle" TargetType="ContentPresenter" BasedOn="{StaticResource BaseContentPresenterStyle}">
  145. <Setter Property="FontFamily" Value="{ThemeResource PivotHeaderItemFontFamily}" />
  146. <Setter Property="FontWeight" Value="{ThemeResource PivotHeaderItemThemeFontWeight}"/>
  147. <Setter Property="FontSize" Value="{ThemeResource PivotHeaderItemFontSize}"/>
  148. </Style>
  149. </Grid.Resources>
  150. <VisualStateManager.VisualStateGroups>
  151. <VisualStateGroup x:Name="SelectionStates">
  152. <VisualStateGroup.Transitions>
  153. <VisualTransition From="Unselected" To="UnselectedLocked" GeneratedDuration="0:0:0.33" />
  154. <VisualTransition From="UnselectedLocked" To="Unselected" GeneratedDuration="0:0:0.33" />
  155. </VisualStateGroup.Transitions>
  156. <VisualState x:Name="Disabled">
  157. <Storyboard>
  158. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
  159. Storyboard.TargetProperty="Foreground" >
  160. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseMediumLowBrush}" />
  161. </ObjectAnimationUsingKeyFrames>
  162. </Storyboard>
  163. </VisualState>
  164. <VisualState x:Name="Unselected" />
  165. <VisualState x:Name="UnselectedLocked">
  166. <Storyboard>
  167. <DoubleAnimation Storyboard.TargetName="ContentPresenterTranslateTransform"
  168. Storyboard.TargetProperty="X"
  169. Duration="0" To="{ThemeResource PivotHeaderItemLockedTranslation}" />
  170. <DoubleAnimation Storyboard.TargetName="ContentPresenter"
  171. Storyboard.TargetProperty="(UIElement.Opacity)"
  172. Duration="0" To="0" />
  173. </Storyboard>
  174. </VisualState>
  175. <VisualState x:Name="Selected">
  176. <Storyboard>
  177. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
  178. Storyboard.TargetProperty="Foreground" >
  179. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
  180. </ObjectAnimationUsingKeyFrames>
  181. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Grid"
  182. Storyboard.TargetProperty="Background" >
  183. <DiscreteObjectKeyFrame KeyTime="0" Value="#FF42424C" />
  184. </ObjectAnimationUsingKeyFrames>
  185. </Storyboard>
  186. </VisualState>
  187. <VisualState x:Name="UnselectedPointerOver">
  188. <Storyboard>
  189. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
  190. Storyboard.TargetProperty="Foreground" >
  191. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseMediumHighBrush}" />
  192. </ObjectAnimationUsingKeyFrames>
  193. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Grid"
  194. Storyboard.TargetProperty="Background" >
  195. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightTransparentBrush}" />
  196. </ObjectAnimationUsingKeyFrames>
  197. </Storyboard>
  198. </VisualState>
  199. <VisualState x:Name="SelectedPointerOver">
  200. <Storyboard>
  201. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
  202. Storyboard.TargetProperty="Foreground" >
  203. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseMediumHighBrush}" />
  204. </ObjectAnimationUsingKeyFrames>
  205. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Grid"
  206. Storyboard.TargetProperty="Background" >
  207. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightTransparentBrush}" />
  208. </ObjectAnimationUsingKeyFrames>
  209. </Storyboard>
  210. </VisualState>
  211. <VisualState x:Name="UnselectedPressed">
  212. <Storyboard>
  213. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
  214. Storyboard.TargetProperty="Foreground" >
  215. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseMediumHighBrush}" />
  216. </ObjectAnimationUsingKeyFrames>
  217. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Grid"
  218. Storyboard.TargetProperty="Background" >
  219. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightTransparentBrush}" />
  220. </ObjectAnimationUsingKeyFrames>
  221. </Storyboard>
  222. </VisualState>
  223. <VisualState x:Name="SelectedPressed">
  224. <Storyboard>
  225. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
  226. Storyboard.TargetProperty="Foreground" >
  227. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseMediumHighBrush}" />
  228. </ObjectAnimationUsingKeyFrames>
  229. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Grid"
  230. Storyboard.TargetProperty="Background" >
  231. <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightTransparentBrush}" />
  232. </ObjectAnimationUsingKeyFrames>
  233. </Storyboard>
  234. </VisualState>
  235. </VisualStateGroup>
  236. </VisualStateManager.VisualStateGroups>
  237. <ContentPresenter
  238. x:Name="ContentPresenter"
  239. Content="{TemplateBinding Content}"
  240. ContentTemplate="{TemplateBinding ContentTemplate}"
  241. Margin="{TemplateBinding Padding}"
  242. FontSize="{TemplateBinding FontSize}"
  243. FontFamily="{TemplateBinding FontFamily}"
  244. FontWeight="{TemplateBinding FontWeight}"
  245. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  246. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  247. <ContentPresenter.RenderTransform>
  248. <TranslateTransform x:Name="ContentPresenterTranslateTransform" />
  249. </ContentPresenter.RenderTransform>
  250. </ContentPresenter>
  251. </Grid>
  252. </ControlTemplate>
  253. </Setter.Value>
  254. </Setter>
  255. </Style>
  256. </Pivot.Resources>
  257. </Pivot>
  258. </ScrollViewer>
  259. </SplitView.Content>
  260. </SplitView>
  261. </Grid>
  262. </Grid>
  263. </Grid>
  264. </Page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement