forked from microsoft/BuildCast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEpisodeDetails.xaml
100 lines (95 loc) · 6.15 KB
/
EpisodeDetails.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!--
// ******************************************************************
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************
-->
<Page
x:Class="BuildCast.Views.EpisodeDetails"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:localfunc="using:BuildCast.Views"
xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
xmlns:helpers="using:BuildCast.Helpers"
mc:Ignorable="d"
Loaded="EpisodeDetails_Loaded"
animations:Implicit.HideAnimations="{StaticResource DefaultPageHideAnimation}"
>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" x:Name="root">
<Grid.RowDefinitions>
<RowDefinition Height="415" x:Name="TopBorderRow"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="LightSlateGray" x:Name="TopBorder"
animations:Implicit.ShowAnimations="{StaticResource DefaultShowAnimations}"
animations:Implicit.HideAnimations="{StaticResource DefaultHideAnimations}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image x:Name="headerbackground"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
Stretch="Fill"
Grid.ColumnSpan="2" >
<Image.Source>
<BitmapImage UriSource="{x:Bind ViewModel.CurrentEpisode.Feed.ImageUri}" />
</Image.Source>
</Image>
<Rectangle Fill="{StaticResource InApp}" Grid.ColumnSpan="2" />
<Image x:Name="feedItemImage" Height="300" Margin="25,75,24,40"
VerticalAlignment="Top"
HorizontalAlignment="Left" ImageOpened="FeedItemImage_ImageOpened"
animations:Connected.Key="FeedItemImage">
<Image.Source>
<BitmapImage UriSource="{x:Bind ViewModel.CurrentEpisode.ItemThumbnail}" />
</Image.Source>
</Image>
<Grid x:Name="DescriptionRoot" Grid.Column="1" Margin="0,80,50,0" Height="200" VerticalAlignment="Top" animations:Connected.AnchorElement="{x:Bind feedItemImage}">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<TextBlock x:Name="episodetitle" Foreground="White" FontSize="16" FontWeight="Bold" Text="{x:Bind Path=ViewModel.CurrentEpisode.Title}" animations:Connected.Key="feedtitle" />
<TextBlock x:Name="episodesubtitle" Foreground="White" FontSize="16" Text="{x:Bind Path=ViewModel.CurrentEpisode.Subtitle}" />
</StackPanel>
<StackPanel Grid.Row="1">
<TextBlock x:Name="episodepublishdate" Foreground="White" FontSize="16" Text="{x:Bind localfunc:NavigationRoot.ShortDate(ViewModel.CurrentEpisode.PublishDate.Date)}" />
<TextBlock x:Name="episodeduration" Foreground="White" FontSize="16" Text="{x:Bind Path=ViewModel.CurrentEpisode.Duration}" />
</StackPanel>
<CommandBar Grid.Row="2" Background="Transparent" RequestedTheme="Dark" HorizontalAlignment="Left" OverflowButtonVisibility="Collapsed">
<AppBarButton x:Name="playepisode" Icon="Play" Label="Play" AccessKey="P" Click="{x:Bind ViewModel.PlayCurrentEpisode}" XYFocusRight="{x:Bind downloadepisode}"/>
<AppBarButton x:Name="downloadepisode" Icon="Download" Label="Download" AccessKey="D" Click="{x:Bind ViewModel.DownloadCurrentEpisode}" XYFocusLeft="{x:Bind playepisode}" XYFocusRight="{x:Bind favoriteepisode}" />
<AppBarButton x:Name="favoriteepisode" Icon="OutlineStar" Label="Favorite" AccessKey="F" Click="{x:Bind ViewModel.FavoriteCurrentEpisode}" XYFocusLeft="{x:Bind downloadepisode}" />
</CommandBar>
</Grid>
</Grid>
<RelativePanel x:Name="ListContent" Grid.Row="1" Margin="{ThemeResource ContentDialogPadding}" HorizontalAlignment="Stretch"
animations:Implicit.HideAnimations="{StaticResource DefaultListHideAnimations}"
animations:Implicit.ShowAnimations="{StaticResource DefaultListShowAnimations}">
<TextBlock Style="{ThemeResource SubheaderTextBlockStyle}" Name="lowerepisodetitle" Text="{x:Bind Path=ViewModel.CurrentEpisode.Title}" />
<TextBlock Style="{ThemeResource TitleTextBlockStyle}" Name="lowerepisodesubtitle" Text="{x:Bind Path=ViewModel.CurrentEpisode.Subtitle}" RelativePanel.Below="lowerepisodetitle" />
<ScrollViewer x:Name="webScroller"
RelativePanel.Below="lowerepisodesubtitle"
RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignBottomWithPanel="True"
VerticalScrollMode="Enabled"
VerticalScrollBarVisibility="Auto" >
<WebView x:Name="descriptionweb"
DefaultBackgroundColor="Transparent" Height="2000" />
</ScrollViewer>
</RelativePanel>
</Grid>
</Page>