Redesign 1
This commit is contained in:
@@ -80,7 +80,7 @@ namespace FoxTube
|
||||
else
|
||||
trendMore.Complete(true);
|
||||
|
||||
foreach (Google.Apis.YouTube.v3.Data.Video vid in response.Items)
|
||||
foreach (Video vid in response.Items)
|
||||
{
|
||||
VideoCard vCard = new VideoCard(vid.Id);
|
||||
recGrid.Add(vCard);
|
||||
@@ -99,8 +99,6 @@ namespace FoxTube
|
||||
|
||||
if(SecretsVault.IsAuthorized)
|
||||
{
|
||||
navigation.Visibility = Visibility.Visible;
|
||||
|
||||
//Initializing recommended tab
|
||||
StackPanel rs = new StackPanel();
|
||||
rs.Children.Add(recGrid);
|
||||
@@ -111,8 +109,8 @@ namespace FoxTube
|
||||
|
||||
pivot.Items.Add(new PivotItem()
|
||||
{
|
||||
Margin = new Thickness(0, -48, 0, 0),
|
||||
Content = rg
|
||||
Content = rg,
|
||||
Header = "Recommended"
|
||||
});
|
||||
|
||||
//Initializing trending tab
|
||||
@@ -125,8 +123,8 @@ namespace FoxTube
|
||||
|
||||
pivot.Items.Add(new PivotItem()
|
||||
{
|
||||
Margin = new Thickness(0, -48, 0, 0),
|
||||
Content = tg
|
||||
Content = tg,
|
||||
Header = "Trending"
|
||||
});
|
||||
|
||||
//Initializing subscriptions tab
|
||||
@@ -139,8 +137,8 @@ namespace FoxTube
|
||||
|
||||
pivot.Items.Add(new PivotItem()
|
||||
{
|
||||
Margin = new Thickness(0, -48, 0, 0),
|
||||
Content = g
|
||||
Content = g,
|
||||
Header = "Subscriptions"
|
||||
});
|
||||
|
||||
LoadRecommendations();
|
||||
@@ -156,7 +154,6 @@ namespace FoxTube
|
||||
|
||||
pivot.Items.Add(new PivotItem()
|
||||
{
|
||||
Margin = new Thickness(0, -48, 0, 0),
|
||||
Content = tg
|
||||
});
|
||||
|
||||
@@ -164,24 +161,6 @@ namespace FoxTube
|
||||
}
|
||||
}
|
||||
|
||||
private void toRecommended_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pivot.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void toTrending_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (pivot.Items.Count > 1)
|
||||
pivot.SelectedIndex = 1;
|
||||
else
|
||||
pivot.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void tosubs_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pivot.SelectedIndex = 2;
|
||||
}
|
||||
|
||||
private void refresh_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Initialize();
|
||||
@@ -189,32 +168,24 @@ namespace FoxTube
|
||||
|
||||
private void pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
toRecommended.FontWeight = FontWeights.Normal;
|
||||
toTrending.FontWeight = FontWeights.Normal;
|
||||
tosubs.FontWeight = FontWeights.Normal;
|
||||
|
||||
switch(pivot.SelectedIndex)
|
||||
{
|
||||
case 2:
|
||||
tosubs.FontWeight = FontWeights.Bold;
|
||||
if (!subsLoaded)
|
||||
LoadSubscriptions();
|
||||
break;
|
||||
case 1:
|
||||
toTrending.FontWeight = FontWeights.Bold;
|
||||
if (!trendLoaded)
|
||||
LoadTrending();
|
||||
break;
|
||||
case 0:
|
||||
if (pivot.Items.Count > 1)
|
||||
{
|
||||
toRecommended.FontWeight = FontWeights.Bold;
|
||||
if (!recLoaded)
|
||||
LoadRecommendations();
|
||||
}
|
||||
else
|
||||
{
|
||||
toTrending.FontWeight = FontWeights.Bold;
|
||||
if (!trendLoaded)
|
||||
LoadTrending();
|
||||
}
|
||||
@@ -236,7 +207,7 @@ namespace FoxTube
|
||||
else
|
||||
trendMore.Complete(true);
|
||||
|
||||
foreach (Google.Apis.YouTube.v3.Data.Video vid in response.Items)
|
||||
foreach (Video vid in response.Items)
|
||||
{
|
||||
VideoCard vCard = new VideoCard(vid.Id);
|
||||
trendGrid.Add(vCard);
|
||||
|
||||
Reference in New Issue
Block a user