This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbf06dd
commit 95f6de1
Showing
2 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<common:LayoutAwarePage | ||
x:Name="pageRoot" | ||
x:Class="KhanViewer.VideoPlayer" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:KhanViewer" | ||
xmlns:common="using:KhanViewer.Common" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d"> | ||
|
||
<UserControl.Resources> | ||
|
||
<!-- TODO: Delete this line if the key AppName is declared in App.xaml --> | ||
<x:String x:Key="AppName">My Application</x:String> | ||
</UserControl.Resources> | ||
|
||
<!-- | ||
This grid acts as a root panel for the page that defines two rows: | ||
* Row 0 contains the back button and page title | ||
* Row 1 contains the rest of the page layout | ||
--> | ||
<Grid Background="{StaticResource ApplicationPageBackgroundBrush}"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="140"/> | ||
<RowDefinition Height="*"/> | ||
</Grid.RowDefinitions> | ||
|
||
<!-- Back button and page title --> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
<Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/> | ||
<TextBlock x:Name="pageTitle" Grid.Column="1" Text="{StaticResource AppName}" Style="{StaticResource PageHeaderTextStyle}"/> | ||
</Grid> | ||
|
||
<VisualStateManager.VisualStateGroups> | ||
|
||
<!-- Visual states reflect the application's view state --> | ||
<VisualStateGroup> | ||
<VisualState x:Name="FullScreenLandscape"/> | ||
<VisualState x:Name="Filled"/> | ||
|
||
<!-- The entire page respects the narrower 100-pixel margin convention for portrait --> | ||
<VisualState x:Name="FullScreenPortrait"> | ||
<Storyboard> | ||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style"> | ||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/> | ||
</ObjectAnimationUsingKeyFrames> | ||
</Storyboard> | ||
</VisualState> | ||
|
||
<!-- The back button and title have different styles when snapped --> | ||
<VisualState x:Name="Snapped"> | ||
<Storyboard> | ||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style"> | ||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/> | ||
</ObjectAnimationUsingKeyFrames> | ||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style"> | ||
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/> | ||
</ObjectAnimationUsingKeyFrames> | ||
</Storyboard> | ||
</VisualState> | ||
</VisualStateGroup> | ||
</VisualStateManager.VisualStateGroups> | ||
</Grid> | ||
</common:LayoutAwarePage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using Windows.UI.Xaml.Data; | ||
using Windows.UI.Xaml.Input; | ||
using Windows.UI.Xaml.Media; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
// The Basic Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234237 | ||
|
||
namespace KhanViewer | ||
{ | ||
/// <summary> | ||
/// A basic page that provides characteristics common to most applications. | ||
/// </summary> | ||
public sealed partial class VideoPlayer : KhanViewer.Common.LayoutAwarePage | ||
{ | ||
public VideoPlayer() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
/// <summary> | ||
/// Invoked when this page is about to be displayed in a Frame. | ||
/// </summary> | ||
/// <param name="e">Event data that describes how this page was reached. The Parameter | ||
/// property is typically used to configure the page.</param> | ||
protected override void OnNavigatedTo(NavigationEventArgs e) | ||
{ | ||
} | ||
} | ||
} |