diff --git a/FoxTube/Pages/MainPage.xaml b/FoxTube/Pages/MainPage.xaml
index a2bfef9..2ada653 100644
--- a/FoxTube/Pages/MainPage.xaml
+++ b/FoxTube/Pages/MainPage.xaml
@@ -24,17 +24,14 @@
-
-
-
-
+
diff --git a/FoxTube/Pages/VideoPage.xaml b/FoxTube/Pages/VideoPage.xaml
index 63ce695..b9949a0 100644
--- a/FoxTube/Pages/VideoPage.xaml
+++ b/FoxTube/Pages/VideoPage.xaml
@@ -34,67 +34,69 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
diff --git a/FoxTube/Pages/VideoPage.xaml.cs b/FoxTube/Pages/VideoPage.xaml.cs
index 30272f6..4995721 100644
--- a/FoxTube/Pages/VideoPage.xaml.cs
+++ b/FoxTube/Pages/VideoPage.xaml.cs
@@ -92,11 +92,7 @@ namespace FoxTube.Pages
{
Debug.WriteLine("Correcting layout...");
mainContent.Children.Remove(descriptionPanel);
- pivot.Items.Insert(0, new PivotItem()
- {
- Content = descriptionPanel,
- Header = "Description"
- });
+ pivot.Items.Insert(0, descriptionPanel);
tabsPlaceholder.Children.Remove(pivot);
mainContent.Children.Add(pivot);
@@ -360,39 +356,30 @@ namespace FoxTube.Pages
else
wide = false;
- if (e.NewSize.Width > 1000 && e.PreviousSize.Width <= 1000 && !isExtended)
+ if (e.NewSize.Width > 1000 && mainContent.Children.Contains(pivot) && !isExtended)
{
- if (mainContent.Children.Contains(pivot))
- {
- mainContent.Children.Remove(pivot);
- tabsPlaceholder.Children.Add(pivot);
+ mainContent.Children.Remove(pivot);
+ tabsPlaceholder.Children.Add(pivot);
+
+ pivot.Items.RemoveAt(0);
+ mainContent.Children.Add(descriptionPanel);
- (pivot.Items[0] as PivotItem).Content = null;
- pivot.Items.RemoveAt(0);
- mainContent.Children.Add(descriptionPanel);
- }
-
grid.ColumnDefinitions[1].Width = new GridLength(400);
+
+ pivot.SelectedIndex = 0;
}
- else if (e.NewSize.Width <= 1000 & e.PreviousSize.Width > 1000)
+ else if (e.NewSize.Width <= 1000 && mainContent.Children.Contains(descriptionPanel))
{
- if (mainContent.Children.Contains(descriptionPanel))
- {
- mainContent.Children.Remove(descriptionPanel);
- pivot.Items.Insert(0, new PivotItem()
- {
- Content = descriptionPanel,
- Header = "Description"
- });
+ mainContent.Children.Remove(descriptionPanel);
+ pivot.Items.Insert(0, descriptionPanel);
+
+ tabsPlaceholder.Children.Remove(pivot);
+ mainContent.Children.Add(pivot);
- tabsPlaceholder.Children.Remove(pivot);
- mainContent.Children.Add(pivot);
- }
-
grid.ColumnDefinitions[1].Width = new GridLength(0);
- }
- pivot.SelectedIndex = 0;
+ pivot.SelectedIndex = 0;
+ }
}
private async void Share(DataTransferManager sender, DataRequestedEventArgs args)