-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathChannelPage.xaml
86 lines (81 loc) · 5.21 KB
/
ChannelPage.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
<Page
x:Class="ValleyTube.ChannelPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ValleyTube"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid x:Name="MainGrid">
<Grid x:Name="BackgroundGrid">
<Image x:Name="BackgroundImage" Stretch="UniformToFill"/>
<Rectangle Fill="Black" Opacity="0.7" IsHitTestVisible="False"/>
</Grid>
<Grid x:Name="ContentGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Pivot Grid.Row="1" Margin="0,10,0,0">
<PivotItem Header="details">
<ScrollViewer>
<StackPanel>
<StackPanel Margin="10">
<TextBlock x:Name="ChannelTitle" FontSize="24" FontWeight="Bold" Foreground="White"/>
<Button x:Name="SubscribeButton" Content="Subscribe" Click="SubscribeButton_Click"
HorizontalAlignment="Left" Margin="5" Background="#C8102E"
Foreground="White" VerticalAlignment="Center"/>
<TextBlock x:Name="ChannelDescription" TextWrapping="Wrap" FontSize="16" Foreground="White" Margin="0,10,0,0"/>
<TextBlock x:Name="ChannelStatsTextBlock" FontSize="16" Foreground="White"/>
</StackPanel>
</StackPanel>
</ScrollViewer>
</PivotItem>
<PivotItem Header="videos">
<ScrollViewer ViewChanged="ScrollViewer_ViewChanged">
<ListView x:Name="VideosListView">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Button Background="Transparent" BorderBrush="Transparent" Padding="0" Click="ImageButton_Click">
<Grid>
<Image Source="{Binding ThumbnailUrl}" Width="120" Height="90" Margin="0,0,10,0" Stretch="UniformToFill"/>
<Border Background="Black" Opacity="0.8" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0" Padding="0">
<TextBlock Text="{Binding LengthFormatted}" Foreground="White" FontSize="14" FontWeight="Bold"/>
</Border>
</Grid>
</Button>
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding Title}" FontSize="20" FontWeight="Bold" Foreground="White"/>
<TextBlock Text="{Binding Author}" FontSize="14" Foreground="LightGray"/>
<TextBlock Text="{Binding ViewCountText}" FontSize="14" Foreground="LightGray"/>
<TextBlock Text="{Binding PublishedText}" FontSize="14" Foreground="LightGray"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ScrollViewer>
</PivotItem>
<PivotItem Header="community">
<ScrollViewer ViewChanged="CommunityScrollViewer_ViewChanged">
<ListView x:Name="CommunityListView">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical" Margin="0">
<TextBlock Text="{Binding author}" FontSize="20" FontWeight="Bold" Foreground="White"/>
<TextBlock Text="{Binding publishedText}" FontSize="14" Foreground="LightGray" Margin="0,0,0,0"/>
<TextBlock Text="" FontSize="14" Foreground="LightGray" Margin="0,0,15,0" TextWrapping="Wrap"/>
<TextBlock Text="{Binding content}" FontSize="14" Foreground="LightGray" Margin="0,0,15,0" TextWrapping="Wrap"/>
<TextBlock Text="" FontSize="14" Foreground="LightGray" Margin="0,0,15,0" TextWrapping="Wrap"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ScrollViewer>
</PivotItem>
</Pivot>
</Grid>
</Grid>
</Page>