Trending is coming
This commit is contained in:
+29
-17
@@ -9,27 +9,39 @@
|
||||
|
||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0"/>
|
||||
<RowDefinition Height="47"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0" Background="Red">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<HyperlinkButton Content="Recommended" Foreground="White" Margin="10,8,10,10"/>
|
||||
<HyperlinkButton Content="Trending" Foreground="White" Margin="10,8,10,10"/>
|
||||
<HyperlinkButton Content="Subscriptions" Foreground="White" Margin="10,8,10,10"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="10,0,10,0">
|
||||
<HyperlinkButton Name="toRecommended" Click="toVideos_Click" Foreground="White" Margin="0,0,10,0">
|
||||
<TextBlock Text="Recommended"/>
|
||||
</HyperlinkButton>
|
||||
<HyperlinkButton Name="toTrending" Click="toVideos_Click" Foreground="White" Margin="0,0,10,0">
|
||||
<TextBlock Text="Trending"/>
|
||||
</HyperlinkButton>
|
||||
<HyperlinkButton Name="tosubs" Click="toVideos_Click" Foreground="White" Margin="0,0,10,0">
|
||||
<TextBlock Text="Subscriptions"/>
|
||||
</HyperlinkButton>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Frame Grid.Row="1" Name="content" Visibility="Collapsed"/>
|
||||
<Pivot Grid.Row="1" Padding="0">
|
||||
<PivotItem Header="Recommended">
|
||||
<local:VideoGrid/>
|
||||
</PivotItem>
|
||||
<PivotItem Header="Trending">
|
||||
<local:Channel/>
|
||||
</PivotItem>
|
||||
<PivotItem Header="Subscriptions">
|
||||
|
||||
</PivotItem>
|
||||
</Pivot>
|
||||
<Grid Grid.Row="1">
|
||||
<ScrollViewer Margin="0,0,0,50">
|
||||
<Pivot>
|
||||
<PivotItem>
|
||||
|
||||
</PivotItem>
|
||||
<PivotItem>
|
||||
|
||||
</PivotItem>
|
||||
<PivotItem >
|
||||
|
||||
</PivotItem>
|
||||
</Pivot>
|
||||
</ScrollViewer>
|
||||
<CommandBar VerticalAlignment="Bottom">
|
||||
<AppBarButton Icon="Refresh" Content="Refresh page"/>
|
||||
</CommandBar>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace FoxTube
|
||||
public Home()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
content.Navigate(typeof(VideoGrid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ using Google.Apis.YouTube.v3.Data;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using Google.Apis.Util.Store;
|
||||
using System.Globalization;
|
||||
|
||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
|
||||
|
||||
@@ -83,7 +84,10 @@ namespace FoxTube
|
||||
settings.Values.Add("videoAutoplay", true);
|
||||
if (settings.Values["volume"] == null)
|
||||
settings.Values.Add("volume", 100);
|
||||
|
||||
|
||||
if (settings.Values["region"] == null)
|
||||
settings.Values.Add("region", CultureInfo.CurrentCulture);
|
||||
|
||||
content.Navigate(typeof(Home));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
<PivotItem Margin="0,-48,0,0">
|
||||
<StackPanel Orientation="Vertical" Margin="10">
|
||||
<TextBlock Text="Preferences" FontSize="28"/>
|
||||
<ComboBox Header="Language" MinWidth="250" Name="language" SelectionChanged="language_SelectionChanged">
|
||||
<TextBlock Text="Region & language" FontSize="22"/>
|
||||
<ComboBox Header="App interface language" MinWidth="250" Name="language" SelectionChanged="language_SelectionChanged">
|
||||
<ComboBoxItem Content="English"/>
|
||||
<ComboBoxItem Content="Russian"/>
|
||||
</ComboBox>
|
||||
@@ -25,6 +26,10 @@
|
||||
<TextBlock FontFamily="Segoe MDL2 Assets" FontWeight="Bold" Text="" FontSize="30" Foreground="OrangeRed"/>
|
||||
<TextBlock FontFamily="Default" FontWeight="Bold" Text="Reopen the app to apply settings" Foreground="OrangeRed" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
<ComboBox Header="Region (for targeted content)" MinWidth="250" Name="region" SelectionChanged="region_SelectionChanged">
|
||||
<ComboBoxItem Content="English"/>
|
||||
<ComboBoxItem Content="Russian"/>
|
||||
</ComboBox>
|
||||
<TextBlock Text="Playback" FontSize="22"/>
|
||||
<ComboBox Margin="0,0,0,10" Width="250" Header="Default video playback quality" Name="quality" SelectionChanged="quality_SelectionChanged">
|
||||
<ComboBoxItem Content="Auto"/>
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.ApplicationModel;
|
||||
using System.Globalization;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.Storage;
|
||||
@@ -46,6 +47,9 @@ namespace FoxTube
|
||||
|
||||
mobileWarning.IsOn = (bool)settings.Values["moblieWarning"];
|
||||
autoplay.IsOn = (bool)settings.Values["videoAutoplay"];
|
||||
|
||||
foreach (CultureInfo culture in CultureInfo.GetCultures(CultureTypes.AllCultures))
|
||||
region.Items.Add(culture.DisplayName);
|
||||
}
|
||||
|
||||
private void language_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -128,5 +132,10 @@ namespace FoxTube
|
||||
{
|
||||
content.SelectedIndex = 3;
|
||||
}
|
||||
|
||||
private void region_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
settings.Values["region"] = CultureInfo.GetCultures(CultureTypes.AllCultures)[region.SelectedIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user