Channel page 50%
This commit is contained in:
@@ -18,6 +18,10 @@
|
|||||||
<Setter Property="Margin" Value="0,2,0,0"/>
|
<Setter Property="Margin" Value="0,2,0,0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="HyperlinkButton" x:Key="Pivot">
|
||||||
|
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!--<Style x:Key="MenuItemStyle1" TargetType="ListViewItem">
|
<!--<Style x:Key="MenuItemStyle1" TargetType="ListViewItem">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
|
|||||||
+145
-12
@@ -11,28 +11,161 @@
|
|||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="47"/>
|
<RowDefinition Height="47"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="75"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid Grid.Row="0" Background="Red">
|
<Grid Grid.Row="0" Background="Red" Name="navigationPane" Visibility="Visible">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal" Margin="10,0,10,0">
|
||||||
<HyperlinkButton Content="Videos" Foreground="White" Margin="10,8,10,10"/>
|
<HyperlinkButton Name="toVideos" Click="toVideos_Click" Foreground="White" Margin="0,0,10,0">
|
||||||
<HyperlinkButton Content="Playlists" Foreground="White" Margin="10,8,10,10"/>
|
<TextBlock Text="Videos"/>
|
||||||
<HyperlinkButton Content="Community" Foreground="White" Margin="10,8,10,10"/>
|
</HyperlinkButton>
|
||||||
<HyperlinkButton Content="Channels" Foreground="White" Margin="10,8,10,10"/>
|
<HyperlinkButton Foreground="White" Margin="0,0,10,0" Name="toPlaylists" Click="toPlaylists_Click">
|
||||||
<HyperlinkButton Content="About channel" Foreground="White" FontStyle="Normal" Margin="10,8,10,10"/>
|
<TextBlock Text="Playlists"/>
|
||||||
|
</HyperlinkButton>
|
||||||
|
<HyperlinkButton Foreground="White" Margin="0,0,10,0" Name="toCommunity" Click="toCommunity_Click">
|
||||||
|
<TextBlock Text="Community"/>
|
||||||
|
</HyperlinkButton>
|
||||||
|
<HyperlinkButton Foreground="White" Margin="0,0,10,0" Name="toChannels" Click="toChannels_Click">
|
||||||
|
<TextBlock Text="Channels"/>
|
||||||
|
</HyperlinkButton>
|
||||||
|
<HyperlinkButton Foreground="White" Margin="0,0,10,0" Name="toAbout" Click="toAbout_Click">
|
||||||
|
<TextBlock Text="About channel"/>
|
||||||
|
</HyperlinkButton>
|
||||||
<TextBox Name="searchField" ToolTipService.ToolTip="Search on channel" Margin="4" Width="350" Height="47" Padding="10,10,5,0" PlaceholderText="Search on channel" BorderThickness="0" Background="#7FFFFFFF"/>
|
<TextBox Name="searchField" ToolTipService.ToolTip="Search on channel" Margin="4" Width="350" Height="47" Padding="10,10,5,0" PlaceholderText="Search on channel" BorderThickness="0" Background="#7FFFFFFF"/>
|
||||||
<Button Name="searchButton" HorizontalAlignment="Right"
|
<Button Name="searchButton" HorizontalAlignment="Right" Click="searchButton_Click"
|
||||||
Width="39" Height="39" Margin="0" Padding="1"
|
Width="39" Height="39" Margin="0" Padding="1"
|
||||||
RelativePanel.AlignRightWithPanel="True"
|
RelativePanel.AlignRightWithPanel="True"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
FontFamily="Segoe MDL2 Assets" Content="" FontSize="20" FocusVisualSecondaryBrush="#66FFFFFF" FocusVisualPrimaryBrush="White" Foreground="White"/>
|
FontFamily="Segoe MDL2 Assets" Content="" FontSize="20" FocusVisualSecondaryBrush="#66FFFFFF" FocusVisualPrimaryBrush="White" Foreground="White"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Frame Grid.Row="1" Name="content"/>
|
<ScrollViewer Grid.Row="1">
|
||||||
<CommandBar Grid.Row="2" VerticalAlignment="Bottom">
|
<Pivot SelectedIndex="0" Name="content">
|
||||||
|
<PivotItem Margin="0,-48,0,0">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition MinHeight="50" MaxHeight="310"/>
|
||||||
|
<RowDefinition Height="75"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Image Grid.Row="0" Name="channelCover" Width="1920" Source="Assets/ChannelCoverTemplate.png"/>
|
||||||
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="120"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="250"/>
|
||||||
|
<ColumnDefinition Width="60"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<PersonPicture Name="avatar" Grid.Column="0" HorizontalAlignment="Left" Margin="10,-40,0,0" ProfilePicture="Assets/LogoAvatar.png"/>
|
||||||
|
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="10,0,0,0">
|
||||||
|
<TextBlock Name="title" FontWeight="SemiBold" FontSize="22" Text="Channel name"/>
|
||||||
|
<TextBlock Name="subscribers" Foreground="Gray" Text="1,000,000 subscribers"/>
|
||||||
|
<TextBlock Name="videosCount" Foreground="Gray" Text="563,000 videos"/>
|
||||||
|
</StackPanel>
|
||||||
|
<ToggleButton Grid.Column="2" Height="50" Width="250" Background="Red" Foreground="White" FontSize="18" FontWeight="SemiBold" Content="Subscirbe"/>
|
||||||
|
<ToggleButton Grid.Column="3" Height="50" Width="50" FontFamily="Segoe MDL2 Assets" FontSize="18" FontWeight="SemiBold" Content="" Foreground="White" Background="Red"/>
|
||||||
|
<!---->
|
||||||
|
</Grid>
|
||||||
|
<StackPanel Name="videos">
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</PivotItem>
|
||||||
|
<PivotItem Margin="0,-48,0,0">
|
||||||
|
<Grid Padding="10">
|
||||||
|
<ProgressRing Name="playlistRing" Width="100" Height="100" Foreground="Red" IsActive="True"/>
|
||||||
|
<StackPanel Visibility="Collapsed" Name="playlistPane">
|
||||||
|
<TextBlock FontSize="28" Text="Playlists"/>
|
||||||
|
<StackPanel Name="playlists">
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</PivotItem>
|
||||||
|
<PivotItem Margin="0,-48,0,0">
|
||||||
|
<StackPanel Padding="10">
|
||||||
|
<TextBlock FontSize="28" Text="Community"/>
|
||||||
|
<StackPanel Name="community">
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</PivotItem>
|
||||||
|
<PivotItem Margin="0,-48,0,0">
|
||||||
|
<StackPanel Padding="10">
|
||||||
|
<TextBlock FontSize="28" Text="Featured channels"/>
|
||||||
|
<StackPanel Name="channels">
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</PivotItem>
|
||||||
|
<PivotItem Margin="0,-48,0,0">
|
||||||
|
<StackPanel Visibility="Visible" Margin="10">
|
||||||
|
<TextBlock FontSize="28" Text="About this channel"/>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="3*"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Margin="10">
|
||||||
|
<TextBlock FontSize="24" Text="Description"/>
|
||||||
|
<Line Stroke="Black" Y1="0" Y2="0" StrokeThickness="2" X2="2000"/>
|
||||||
|
<TextBlock Name="description" Margin="0,10,0,0" TextWrapping="WrapWholeWords" IsTextSelectionEnabled="True"/>
|
||||||
|
<!--<TextBlock FontSize="24" Text="Links" Margin="0,10,0,0"/>
|
||||||
|
<Line Stroke="Black" Y1="0" Y2="0" StrokeThickness="2" X2="2000"/>
|
||||||
|
<StackPanel Name="links">
|
||||||
|
|
||||||
|
</StackPanel>-->
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Column="1" Margin="10">
|
||||||
|
<TextBlock FontSize="24" Text="Statistics"/>
|
||||||
|
<Line Stroke="Black" Y1="0" Y2="0" StrokeThickness="2" X2="2000"/>
|
||||||
|
|
||||||
|
<StackPanel Margin="5">
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Text="Registration date:"/>
|
||||||
|
<TextBlock Name="registration" Text="13-May-18" HorizontalAlignment="Right"/>
|
||||||
|
</Grid>
|
||||||
|
<Line Stroke="Black" Y1="0" Y2="0" StrokeThickness="2" X2="2000"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Margin="5">
|
||||||
|
<Grid>
|
||||||
|
<TextBlock Text="Views"/>
|
||||||
|
<TextBlock Name="views" Text="1885510485" HorizontalAlignment="Right"/>
|
||||||
|
</Grid>
|
||||||
|
<Line Stroke="Black" Y1="0" Y2="0" StrokeThickness="2" X2="2000"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Button Content="Send a message" Margin="5" HorizontalAlignment="Right"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</PivotItem>
|
||||||
|
<PivotItem Margin="0,-48,0,0">
|
||||||
|
<Grid Padding="10">
|
||||||
|
<ProgressRing Name="searchRing" HorizontalAlignment="Center" VerticalAlignment="Center" IsActive="True" Foreground="Red" Width="100" Height="100"/>
|
||||||
|
<StackPanel Orientation="Vertical" Margin="10" Visibility="Visible" Name="displaying">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="Search results for: " FontSize="28"/>
|
||||||
|
<TextBlock Name="searchTerm" Text="[searchTerm]" FontSize="28" Margin="10,0,0,0"/>
|
||||||
|
<TextBlock Text="from" FontSize="28" Margin="10,0,0,0"/>
|
||||||
|
<TextBlock Name="searchChannel" Text="[channelName]" FontSize="28" Margin="10,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="Found:" FontSize="14" Foreground="Gray" Margin="0,-5,0,10"/>
|
||||||
|
<TextBlock Name="resultsCount" Text="[resultsCount]" FontSize="14" Foreground="Gray" Margin="5,-5,0,10"/>
|
||||||
|
<TextBlock Text="items" FontSize="14" Foreground="Gray" Margin="5,-5,0,10"/>
|
||||||
|
</StackPanel>
|
||||||
|
<HyperlinkButton Content="Show filters " FontFamily="Default, Segoe MDL2 Assets" FontSize="18" Visibility="Collapsed"/>
|
||||||
|
<StackPanel Name="resultsList" Orientation="Vertical">
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</PivotItem>
|
||||||
|
</Pivot>
|
||||||
|
</ScrollViewer>
|
||||||
|
<CommandBar Grid.Row="1" VerticalAlignment="Bottom" Name="commandBar">
|
||||||
<AppBarToggleButton Icon="Favorite" Label="Add to bookmarks"/>
|
<AppBarToggleButton Icon="Favorite" Label="Add to bookmarks"/>
|
||||||
<AppBarToggleButton Icon="Refresh" Label="Refresh"/>
|
<AppBarToggleButton Icon="Refresh" Label="Refresh"/>
|
||||||
<AppBarButton Icon="Flag" Label="Report" ToolTipService.ToolTip="Report this channel"/>
|
<AppBarButton Icon="Flag" Label="Report this channel"/>
|
||||||
</CommandBar>
|
</CommandBar>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
+139
-1
@@ -13,6 +13,11 @@ using Windows.UI.Xaml.Input;
|
|||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
using Windows.UI.Xaml.Navigation;
|
using Windows.UI.Xaml.Navigation;
|
||||||
|
|
||||||
|
using Google.Apis.Services;
|
||||||
|
using Google.Apis.YouTube.v3;
|
||||||
|
using Google.Apis.YouTube.v3.Data;
|
||||||
|
using Windows.UI.Xaml.Media.Imaging;
|
||||||
|
|
||||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
||||||
|
|
||||||
namespace FoxTube
|
namespace FoxTube
|
||||||
@@ -22,10 +27,143 @@ namespace FoxTube
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class Channel : Page
|
public sealed partial class Channel : Page
|
||||||
{
|
{
|
||||||
|
public string channelId;
|
||||||
|
public Google.Apis.YouTube.v3.Data.Channel item;
|
||||||
public Channel()
|
public Channel()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
content.Navigate(typeof(ChannelVideos));
|
}
|
||||||
|
|
||||||
|
private void toAbout_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
content.SelectedIndex = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void Initialize(string id)
|
||||||
|
{
|
||||||
|
channelId = id;
|
||||||
|
|
||||||
|
YouTubeService ytService = new YouTubeService(new BaseClientService.Initializer()
|
||||||
|
{
|
||||||
|
ApiKey = "AIzaSyBgHrCnrlzlVmk0cJKL8RqP9Y8x6XSuk_0",
|
||||||
|
ApplicationName = this.GetType().ToString()
|
||||||
|
});
|
||||||
|
|
||||||
|
ChannelsResource.ListRequest request = ytService.Channels.List("snippet,contentDetails,statistics,brandingSettings");
|
||||||
|
request.Id = id;
|
||||||
|
ChannelListResponse response = await request.ExecuteAsync();
|
||||||
|
|
||||||
|
item = response.Items[0];
|
||||||
|
|
||||||
|
title.Text = item.Snippet.Title;
|
||||||
|
subscribers.Text = item.Statistics.SubscriberCount + " subscribers";
|
||||||
|
videosCount.Text = item.Statistics.VideoCount + " videos";
|
||||||
|
|
||||||
|
channelCover.Source = new BitmapImage(new Uri(item.BrandingSettings.Image.BannerImageUrl));
|
||||||
|
avatar.ProfilePicture = new BitmapImage(new Uri(item.Snippet.Thumbnails.Medium.Url));
|
||||||
|
|
||||||
|
description.Text = item.Snippet.Description;
|
||||||
|
views.Text = item.Statistics.ViewCount.ToString();
|
||||||
|
registration.Text = item.Snippet.PublishedAt.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toVideos_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
content.SelectedIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void toPlaylists_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
content.SelectedIndex = 1;
|
||||||
|
|
||||||
|
if(playlists.Children.Count == 0)
|
||||||
|
{
|
||||||
|
YouTubeService ytService = new YouTubeService(new BaseClientService.Initializer()
|
||||||
|
{
|
||||||
|
ApiKey = "AIzaSyBgHrCnrlzlVmk0cJKL8RqP9Y8x6XSuk_0",
|
||||||
|
ApplicationName = this.GetType().ToString()
|
||||||
|
});
|
||||||
|
|
||||||
|
PlaylistsResource.ListRequest request = ytService.Playlists.List("snippet,contentDetails");
|
||||||
|
request.MaxResults = 25;
|
||||||
|
request.ChannelId = channelId;
|
||||||
|
PlaylistListResponse response = await request.ExecuteAsync();
|
||||||
|
|
||||||
|
foreach (Playlist playlist in response.Items)
|
||||||
|
{
|
||||||
|
PlaylistCardWide playlistCard = new PlaylistCardWide(playlist.Id, true);
|
||||||
|
playlists.Children.Add(playlistCard);
|
||||||
|
}
|
||||||
|
|
||||||
|
playlistRing.IsActive = false;
|
||||||
|
playlistPane.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toCommunity_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
content.SelectedIndex = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toChannels_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
content.SelectedIndex = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void searchButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
content.SelectedIndex = 5;
|
||||||
|
|
||||||
|
YouTubeService ytService = new YouTubeService(new BaseClientService.Initializer()
|
||||||
|
{
|
||||||
|
ApiKey = "AIzaSyBgHrCnrlzlVmk0cJKL8RqP9Y8x6XSuk_0",
|
||||||
|
ApplicationName = this.GetType().ToString()
|
||||||
|
});
|
||||||
|
|
||||||
|
var searchListRequest = ytService.Search.List("snippet");
|
||||||
|
searchListRequest.Q = searchField.Text;
|
||||||
|
searchListRequest.MaxResults = 25;
|
||||||
|
|
||||||
|
var response = await searchListRequest.ExecuteAsync();
|
||||||
|
|
||||||
|
SetResults(searchField.Text, (int)response.PageInfo.TotalResults);
|
||||||
|
foreach (SearchResult result in response.Items)
|
||||||
|
AddItem(result);
|
||||||
|
searchRing.IsActive = false;
|
||||||
|
displaying.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetResults(string keyword, int count)
|
||||||
|
{
|
||||||
|
searchTerm.Text = keyword;
|
||||||
|
if (count == 1000000)
|
||||||
|
resultsCount.Text = count + "+";
|
||||||
|
else
|
||||||
|
resultsCount.Text = count.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddItem(SearchResult result)
|
||||||
|
{
|
||||||
|
switch (result.Id.Kind)
|
||||||
|
{
|
||||||
|
case "youtube#video":
|
||||||
|
VideoCardWide vCard = new VideoCardWide(result.Id.VideoId);
|
||||||
|
resultsList.Children.Add(vCard);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "youtube#channel":
|
||||||
|
ChannelCard cCard = new ChannelCard(result.Id.ChannelId, result.Snippet.LiveBroadcastContent);
|
||||||
|
resultsList.Children.Add(cCard);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "youtube#playlist":
|
||||||
|
PlaylistCardWide pCard = new PlaylistCardWide(result.Id.PlaylistId);
|
||||||
|
resultsList.Children.Add(pCard);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ namespace FoxTube
|
|||||||
|
|
||||||
var item = response.Items[0];
|
var item = response.Items[0];
|
||||||
|
|
||||||
|
channelId = id;
|
||||||
|
|
||||||
channelName.Text = item.Snippet.Title;
|
channelName.Text = item.Snippet.Title;
|
||||||
subscribers.Text = string.Format("{0} subscribers", item.Statistics.SubscriberCount);
|
subscribers.Text = string.Format("{0} subscribers", item.Statistics.SubscriberCount);
|
||||||
videoCount.Text = string.Format("{0} videos", item.Statistics.VideoCount);
|
videoCount.Text = string.Format("{0} videos", item.Statistics.VideoCount);
|
||||||
@@ -55,26 +57,11 @@ namespace FoxTube
|
|||||||
liveTag.Visibility = Visibility.Visible;
|
liveTag.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddInfo(string name, int videos, string avatarUrl, string channelUrl, int subs, Visibility live, bool logged)
|
|
||||||
{
|
|
||||||
channelName.Text = name;
|
|
||||||
videoCount.Text = string.Format("{0} videos", videos);
|
|
||||||
|
|
||||||
avatar.ProfilePicture = new BitmapImage(new Uri(avatarUrl));
|
|
||||||
|
|
||||||
subscribers.Text = string.Format("{0} subscribers", subs);
|
|
||||||
|
|
||||||
channelId = channelUrl;
|
|
||||||
liveTag.Visibility = live;
|
|
||||||
|
|
||||||
if (!logged)
|
|
||||||
subscriptionPane.Visibility = Visibility.Collapsed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Button_Click(object sender, RoutedEventArgs e)
|
private void Button_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
/*Debug.WriteLine(channelId);
|
Frame root = Window.Current.Content as Frame;
|
||||||
Process.Start(channelId);*/
|
MainPage main = root.Content as MainPage;
|
||||||
|
main.GoToChannel(channelId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
<Page
|
|
||||||
x:Class="FoxTube.ChannelVideos"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="using:FoxTube"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
mc:Ignorable="d">
|
|
||||||
|
|
||||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition MinHeight="50" MaxHeight="310"/>
|
|
||||||
<RowDefinition Height="75"/>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Image Grid.Row="0" Name="ChannelCover" Width="1920" Source="Assets/ChannelCoverTemplate.png"/>
|
|
||||||
<Grid Grid.Row="1">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="120"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="250"/>
|
|
||||||
<ColumnDefinition Width="60"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<PersonPicture Grid.Column="0" HorizontalAlignment="Left" Margin="10,-40,0,0" ProfilePicture="Assets/LogoAvatar.png"/>
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="10,0,0,0">
|
|
||||||
<TextBlock FontWeight="SemiBold" FontSize="22" Text="Channel name"/>
|
|
||||||
<TextBlock Foreground="Gray" Text="1,000,000 subscribers"/>
|
|
||||||
<TextBlock Foreground="Gray" Text="563,000 videos"/>
|
|
||||||
</StackPanel>
|
|
||||||
<ToggleButton Grid.Column="2" Height="50" Width="250" Background="Red" Foreground="White" FontSize="18" FontWeight="SemiBold" Content="Subscirbe"/>
|
|
||||||
<ToggleButton Grid.Column="3" Height="50" Width="50" FontFamily="Segoe MDL2 Assets" FontSize="18" FontWeight="SemiBold" Content="" Foreground="White" Background="Red"/>
|
|
||||||
<!---->
|
|
||||||
</Grid>
|
|
||||||
<Frame Name="content" Grid.Row="2"/>
|
|
||||||
</Grid>
|
|
||||||
</Page>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
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 Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
||||||
|
|
||||||
namespace FoxTube
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
|
||||||
/// </summary>
|
|
||||||
public sealed partial class ChannelVideos : Page
|
|
||||||
{
|
|
||||||
public ChannelVideos()
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
content.Navigate(typeof(VideoGrid));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -104,9 +104,6 @@
|
|||||||
<Compile Include="ChannelCard.xaml.cs">
|
<Compile Include="ChannelCard.xaml.cs">
|
||||||
<DependentUpon>ChannelCard.xaml</DependentUpon>
|
<DependentUpon>ChannelCard.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ChannelVideos.xaml.cs">
|
|
||||||
<DependentUpon>ChannelVideos.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Feedback.xaml.cs">
|
<Compile Include="Feedback.xaml.cs">
|
||||||
<DependentUpon>Feedback.xaml</DependentUpon>
|
<DependentUpon>Feedback.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -116,9 +113,6 @@
|
|||||||
<Compile Include="Home.xaml.cs">
|
<Compile Include="Home.xaml.cs">
|
||||||
<DependentUpon>Home.xaml</DependentUpon>
|
<DependentUpon>Home.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MainFrame.xaml.cs">
|
|
||||||
<DependentUpon>MainFrame.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="MainPage.xaml.cs">
|
<Compile Include="MainPage.xaml.cs">
|
||||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -148,9 +142,6 @@
|
|||||||
<Compile Include="VideoGrid.xaml.cs">
|
<Compile Include="VideoGrid.xaml.cs">
|
||||||
<DependentUpon>VideoGrid.xaml</DependentUpon>
|
<DependentUpon>VideoGrid.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="VideoList.xaml.cs">
|
|
||||||
<DependentUpon>VideoList.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="VideoPlayer.xaml.cs">
|
<Compile Include="VideoPlayer.xaml.cs">
|
||||||
<DependentUpon>VideoPlayer.xaml</DependentUpon>
|
<DependentUpon>VideoPlayer.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -234,10 +225,6 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="ChannelVideos.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Feedback.xaml">
|
<Page Include="Feedback.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -250,10 +237,6 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="MainFrame.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="MainPage.xaml">
|
<Page Include="MainPage.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -290,10 +273,6 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="VideoList.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="VideoPlayer.xaml">
|
<Page Include="VideoPlayer.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
<Page
|
|
||||||
x:Class="FoxTube.MainFrame"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="using:FoxTube"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
mc:Ignorable="d">
|
|
||||||
|
|
||||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
||||||
<Grid Height="50" VerticalAlignment="Top" Background="Red">
|
|
||||||
<Button Content="" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#00000000" FontFamily="Segoe MDL2 Assets" FontSize="20" Foreground="White" Margin="0,0,1870,0" RenderTransformOrigin="0,0"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</Page>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
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 Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
||||||
|
|
||||||
namespace FoxTube
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
|
||||||
/// </summary>
|
|
||||||
public sealed partial class MainFrame : Page
|
|
||||||
{
|
|
||||||
public MainFrame()
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-70
@@ -107,82 +107,14 @@
|
|||||||
RelativePanel.AlignRightWithPanel="True"
|
RelativePanel.AlignRightWithPanel="True"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
FontFamily="Segoe MDL2 Assets" Content="" FontSize="20" Foreground="Black"/>
|
FontFamily="Segoe MDL2 Assets" Content="" FontSize="20" Foreground="Black"/>
|
||||||
<Popup Margin="0,50,0,0" Grid.Column="9" Name="searchSuggestions" IsOpen="True" Visibility="Visible">
|
<Popup Margin="0,50,0,0" Grid.Column="9" Name="searchSuggestions" IsOpen="True" Visibility="Collapsed">
|
||||||
<StackPanel Background="WhiteSmoke" Width="350">
|
<StackPanel Background="WhiteSmoke" Width="350">
|
||||||
<StackPanel Width="350" Name="searchStandby" Visibility="Visible" Margin="10">
|
<StackPanel Width="350" Name="searchStandby" Visibility="Visible" Margin="10">
|
||||||
<TextBlock Text="Loading results... Please, wait."/>
|
<TextBlock Text="Loading results... Please, wait."/>
|
||||||
<ProgressBar IsIndeterminate="True"/>
|
<ProgressBar IsIndeterminate="True"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ListBox Name="searchSuggestionsList" Visibility="Visible" SelectionChanged="searchSuggestionsList_SelectionChanged">
|
<ListBox Name="searchSuggestionsList" Visibility="Visible" SelectionChanged="searchSuggestionsList_SelectionChanged">
|
||||||
<ListBoxItem Content="Suggestion"/>
|
|
||||||
<ListBoxItem Content="S1"/>
|
|
||||||
<ListBoxItem Content="S2"/>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Visible">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 0" Name="t0"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Collapsed">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 1" Name="t1"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Collapsed">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 2" Name="t2"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Collapsed">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 3" Name="t3"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Collapsed">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 4" Name="t4"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Padding="0" IsEnabled="False">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="Previous requests" Foreground="Gray" FontSize="12" Margin="0" Padding="0, 0, 5, 0"/>
|
|
||||||
<Line X1="0" Y1="10" X2="250" Y2="10" Stroke="Gray" StrokeThickness="2"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Collapsed">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 6" Name="t6"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Collapsed">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 7" Name="t7"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Collapsed">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 8" Name="t8"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Collapsed">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 9" Name="t9"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
<ListBoxItem Height="35" Padding="0" Visibility="Collapsed">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Style="{StaticResource ItemIcon}" Text=""/>
|
|
||||||
<TextBlock Style="{StaticResource MenuItem}" Text="Suggestion 10" Name="t10"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ListBoxItem>
|
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Popup>
|
</Popup>
|
||||||
|
|||||||
@@ -563,5 +563,13 @@ namespace FoxTube
|
|||||||
searchButton_Click(this, null);
|
searchButton_Click(this, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void GoToChannel(string id)
|
||||||
|
{
|
||||||
|
headerText.Text = "Channel overview";
|
||||||
|
content.Navigate(typeof(Channel));
|
||||||
|
Channel page = content.Content as Channel;
|
||||||
|
page.Initialize(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<TextBlock Name="title" TextWrapping="WrapWholeWords" Text="Subnautica - SAY GOODBYE TO SUBNAUTICA! We're Back Home! - Subnautica Ending (Full Release Gameplay)" FontSize="20" MaxLines="2"/>
|
<TextBlock Name="title" TextWrapping="WrapWholeWords" Text="Subnautica - SAY GOODBYE TO SUBNAUTICA! We're Back Home! - Subnautica Ending (Full Release Gameplay)" FontSize="20" MaxLines="2"/>
|
||||||
<TextBlock Name="info" Text="09-May-18 18:31 | 30 videos" Foreground="Gray"/>
|
<TextBlock Name="info" Text="09-May-18 18:31 | 30 videos" Foreground="Gray"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Grid Grid.Row="1">
|
<Grid Grid.Row="1" Name="authorData">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="75"/>
|
<ColumnDefinition Width="75"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<StackPanel Orientation="Vertical" Grid.Column="1" Padding="10,5,5,5" VerticalAlignment="Center">
|
<StackPanel Orientation="Vertical" Grid.Column="1" Padding="10,5,5,5" VerticalAlignment="Center">
|
||||||
<TextBlock Name="channelName" Text="IGP" FontSize="18"/>
|
<TextBlock Name="channelName" Text="IGP" FontSize="18"/>
|
||||||
<TextBlock Name="channelSubs" Text="120,452 subscribers" Foreground="Gray"/>
|
<TextBlock Name="channelSubs" Text="120,452 subscribers" Foreground="Gray"/>
|
||||||
<HyperlinkButton Name="channelLink" Content="Go to channel" Padding="0"/>
|
<HyperlinkButton Name="channelLink" Content="Go to channel" Padding="0" Click="channelLink_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -27,13 +27,14 @@ namespace FoxTube
|
|||||||
{
|
{
|
||||||
public sealed partial class PlaylistCardWide : UserControl
|
public sealed partial class PlaylistCardWide : UserControl
|
||||||
{
|
{
|
||||||
public PlaylistCardWide(string id)
|
public string channelId;
|
||||||
|
public PlaylistCardWide(string id, bool hideAuthor = false)
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
Initialize(id);
|
Initialize(id, hideAuthor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void Initialize(string id)
|
public async void Initialize(string id, bool hideAuthor)
|
||||||
{
|
{
|
||||||
YouTubeService ytService = new YouTubeService(new BaseClientService.Initializer()
|
YouTubeService ytService = new YouTubeService(new BaseClientService.Initializer()
|
||||||
{
|
{
|
||||||
@@ -47,11 +48,17 @@ namespace FoxTube
|
|||||||
|
|
||||||
var item = response.Items[0];
|
var item = response.Items[0];
|
||||||
|
|
||||||
|
channelId = id;
|
||||||
|
|
||||||
title.Text = item.Snippet.Title;
|
title.Text = item.Snippet.Title;
|
||||||
info.Text = string.Format("{0} | {1} videos", item.Snippet.PublishedAt, item.ContentDetails.ItemCount);
|
info.Text = string.Format("{0} | {1} videos", item.Snippet.PublishedAt, item.ContentDetails.ItemCount);
|
||||||
thumbCount.Text = item.ContentDetails.ItemCount.ToString();
|
thumbCount.Text = item.ContentDetails.ItemCount.ToString();
|
||||||
thumbnail.Source = new BitmapImage(new Uri(item.Snippet.Thumbnails.Medium.Url));
|
thumbnail.Source = new BitmapImage(new Uri(item.Snippet.Thumbnails.Medium.Url));
|
||||||
|
|
||||||
|
if (hideAuthor)
|
||||||
|
authorData.Visibility = Visibility.Collapsed;
|
||||||
|
else
|
||||||
|
{
|
||||||
var request1 = ytService.Channels.List("snippet,contentDetails,statistics");
|
var request1 = ytService.Channels.List("snippet,contentDetails,statistics");
|
||||||
request1.Id = item.Snippet.ChannelId;
|
request1.Id = item.Snippet.ChannelId;
|
||||||
ChannelListResponse response1 = await request1.ExecuteAsync();
|
ChannelListResponse response1 = await request1.ExecuteAsync();
|
||||||
@@ -64,4 +71,11 @@ namespace FoxTube
|
|||||||
channelLink.NavigateUri = new Uri("https://www.youtube.com/channel/" + item.Snippet.ChannelId);
|
channelLink.NavigateUri = new Uri("https://www.youtube.com/channel/" + item.Snippet.ChannelId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void channelLink_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
MainPage root = Window.Current.Content as MainPage;
|
||||||
|
root.GoToChannel(channelId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<!--<TextBlock MaxLines="4" Foreground="Gray" Margin="0,5,0,0" Text="Bendy and the Ink Machine: Chapter 4 Gameplay Part 1 - The Most Horrific Thing Yet! Bertrum Boss Fight! - Welcome back to Bendy and the Ink Machine! Today in Bendy and the Ink Machine, we check out Chapter 4, the latest and most terrifying chapter yet! We discover new secrets and find a man alive...kind of. Let's play Bendy and the Ink Machine Chapter 4!"/>-->
|
<!--<TextBlock MaxLines="4" Foreground="Gray" Margin="0,5,0,0" Text="Bendy and the Ink Machine: Chapter 4 Gameplay Part 1 - The Most Horrific Thing Yet! Bertrum Boss Fight! - Welcome back to Bendy and the Ink Machine! Today in Bendy and the Ink Machine, we check out Chapter 4, the latest and most terrifying chapter yet! We discover new secrets and find a man alive...kind of. Let's play Bendy and the Ink Machine Chapter 4!"/>-->
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Grid Grid.Row="1">
|
<Grid Grid.Row="1" Name="authorData">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="75"/>
|
<ColumnDefinition Width="75"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<StackPanel Orientation="Vertical" Grid.Column="1" Padding="10,5,5,5" VerticalAlignment="Center">
|
<StackPanel Orientation="Vertical" Grid.Column="1" Padding="10,5,5,5" VerticalAlignment="Center">
|
||||||
<TextBlock Name="channelName" Text="IGP" FontSize="18"/>
|
<TextBlock Name="channelName" Text="IGP" FontSize="18"/>
|
||||||
<TextBlock Name="channelSubs" Text="120,452 subscribers" Foreground="Gray"/>
|
<TextBlock Name="channelSubs" Text="120,452 subscribers" Foreground="Gray"/>
|
||||||
<HyperlinkButton Name="channelLink" Content="Go to channel" Padding="0"/>
|
<HyperlinkButton Name="channelLink" Content="Go to channel" Padding="0" Click="channelLink_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace FoxTube
|
|||||||
{
|
{
|
||||||
public sealed partial class VideoCardWide : UserControl
|
public sealed partial class VideoCardWide : UserControl
|
||||||
{
|
{
|
||||||
|
public string channeId;
|
||||||
public VideoCardWide(string id)
|
public VideoCardWide(string id)
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
@@ -47,6 +48,8 @@ namespace FoxTube
|
|||||||
|
|
||||||
var item = response.Items[0];
|
var item = response.Items[0];
|
||||||
|
|
||||||
|
channeId = id;
|
||||||
|
|
||||||
title.Text = item.Snippet.Title;
|
title.Text = item.Snippet.Title;
|
||||||
info.Text = string.Format("{0} | {1} | {2} views", item.ContentDetails.Duration, item.Snippet.PublishedAt, item.Statistics.ViewCount);
|
info.Text = string.Format("{0} | {1} | {2} views", item.ContentDetails.Duration, item.Snippet.PublishedAt, item.Statistics.ViewCount);
|
||||||
thumbnail.Source = new BitmapImage(new Uri(item.Snippet.Thumbnails.Medium.Url));
|
thumbnail.Source = new BitmapImage(new Uri(item.Snippet.Thumbnails.Medium.Url));
|
||||||
@@ -64,5 +67,11 @@ namespace FoxTube
|
|||||||
channelSubs.Text = string.Format("{0} subscribers", item1.Statistics.SubscriberCount);
|
channelSubs.Text = string.Format("{0} subscribers", item1.Statistics.SubscriberCount);
|
||||||
channelLink.NavigateUri = new Uri("https://www.youtube.com/channel/" + item.Snippet.ChannelId);
|
channelLink.NavigateUri = new Uri("https://www.youtube.com/channel/" + item.Snippet.ChannelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void channelLink_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
MainPage root = Window.Current.Content as MainPage;
|
||||||
|
root.GoToChannel(channeId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
<Page
|
|
||||||
x:Class="FoxTube.VideoList"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:local="using:FoxTube"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
mc:Ignorable="d">
|
|
||||||
|
|
||||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
|
||||||
<ScrollViewer>
|
|
||||||
<StackPanel Orientation="Vertical">
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</ScrollViewer>
|
|
||||||
</Grid>
|
|
||||||
</Page>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
|
||||||
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 Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
||||||
|
|
||||||
namespace FoxTube
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
|
||||||
/// </summary>
|
|
||||||
public sealed partial class VideoList : Page
|
|
||||||
{
|
|
||||||
public VideoList()
|
|
||||||
{
|
|
||||||
this.InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user