Trending is coming
This commit is contained in:
+29
-17
@@ -9,27 +9,39 @@
|
|||||||
|
|
||||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0"/>
|
<RowDefinition Height="47"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid Grid.Row="0" Background="Red">
|
<Grid Grid.Row="0" Background="Red">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal" Margin="10,0,10,0">
|
||||||
<HyperlinkButton Content="Recommended" Foreground="White" Margin="10,8,10,10"/>
|
<HyperlinkButton Name="toRecommended" Click="toVideos_Click" Foreground="White" Margin="0,0,10,0">
|
||||||
<HyperlinkButton Content="Trending" Foreground="White" Margin="10,8,10,10"/>
|
<TextBlock Text="Recommended"/>
|
||||||
<HyperlinkButton Content="Subscriptions" Foreground="White" Margin="10,8,10,10"/>
|
</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>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Frame Grid.Row="1" Name="content" Visibility="Collapsed"/>
|
<Grid Grid.Row="1">
|
||||||
<Pivot Grid.Row="1" Padding="0">
|
<ScrollViewer Margin="0,0,0,50">
|
||||||
<PivotItem Header="Recommended">
|
<Pivot>
|
||||||
<local:VideoGrid/>
|
<PivotItem>
|
||||||
</PivotItem>
|
|
||||||
<PivotItem Header="Trending">
|
</PivotItem>
|
||||||
<local:Channel/>
|
<PivotItem>
|
||||||
</PivotItem>
|
|
||||||
<PivotItem Header="Subscriptions">
|
</PivotItem>
|
||||||
|
<PivotItem >
|
||||||
</PivotItem>
|
|
||||||
</Pivot>
|
</PivotItem>
|
||||||
|
</Pivot>
|
||||||
|
</ScrollViewer>
|
||||||
|
<CommandBar VerticalAlignment="Bottom">
|
||||||
|
<AppBarButton Icon="Refresh" Content="Refresh page"/>
|
||||||
|
</CommandBar>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ namespace FoxTube
|
|||||||
public Home()
|
public Home()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
content.Navigate(typeof(VideoGrid));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ using Google.Apis.YouTube.v3.Data;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Google.Apis.Util.Store;
|
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
|
// 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);
|
settings.Values.Add("videoAutoplay", true);
|
||||||
if (settings.Values["volume"] == null)
|
if (settings.Values["volume"] == null)
|
||||||
settings.Values.Add("volume", 100);
|
settings.Values.Add("volume", 100);
|
||||||
|
|
||||||
|
if (settings.Values["region"] == null)
|
||||||
|
settings.Values.Add("region", CultureInfo.CurrentCulture);
|
||||||
|
|
||||||
content.Navigate(typeof(Home));
|
content.Navigate(typeof(Home));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
<PivotItem Margin="0,-48,0,0">
|
<PivotItem Margin="0,-48,0,0">
|
||||||
<StackPanel Orientation="Vertical" Margin="10">
|
<StackPanel Orientation="Vertical" Margin="10">
|
||||||
<TextBlock Text="Preferences" FontSize="28"/>
|
<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="English"/>
|
||||||
<ComboBoxItem Content="Russian"/>
|
<ComboBoxItem Content="Russian"/>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
@@ -25,6 +26,10 @@
|
|||||||
<TextBlock FontFamily="Segoe MDL2 Assets" FontWeight="Bold" Text="" FontSize="30" Foreground="OrangeRed"/>
|
<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"/>
|
<TextBlock FontFamily="Default" FontWeight="Bold" Text="Reopen the app to apply settings" Foreground="OrangeRed" VerticalAlignment="Center"/>
|
||||||
</StackPanel>
|
</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"/>
|
<TextBlock Text="Playback" FontSize="22"/>
|
||||||
<ComboBox Margin="0,0,0,10" Width="250" Header="Default video playback quality" Name="quality" SelectionChanged="quality_SelectionChanged">
|
<ComboBox Margin="0,0,0,10" Width="250" Header="Default video playback quality" Name="quality" SelectionChanged="quality_SelectionChanged">
|
||||||
<ComboBoxItem Content="Auto"/>
|
<ComboBoxItem Content="Auto"/>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
using System.Runtime.InteropServices.WindowsRuntime;
|
||||||
using Windows.ApplicationModel;
|
using Windows.ApplicationModel;
|
||||||
|
using System.Globalization;
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Windows.Foundation.Collections;
|
using Windows.Foundation.Collections;
|
||||||
using Windows.Storage;
|
using Windows.Storage;
|
||||||
@@ -46,6 +47,9 @@ namespace FoxTube
|
|||||||
|
|
||||||
mobileWarning.IsOn = (bool)settings.Values["moblieWarning"];
|
mobileWarning.IsOn = (bool)settings.Values["moblieWarning"];
|
||||||
autoplay.IsOn = (bool)settings.Values["videoAutoplay"];
|
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)
|
private void language_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
@@ -128,5 +132,10 @@ namespace FoxTube
|
|||||||
{
|
{
|
||||||
content.SelectedIndex = 3;
|
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