#204: Fixed
This commit is contained in:
@@ -24,17 +24,14 @@
|
||||
<VisualState.Setters>
|
||||
<Setter Target="header.FontSize" Value="28"/>
|
||||
<Setter Target="headerGrid.Margin" Value="10,25,0,0"/>
|
||||
<Setter Target="nav.Margin" Value="0"/>
|
||||
<Setter Target="account.Height" Value="50"/>
|
||||
<Setter Target="notificationMenu.Height" Value="50"/>
|
||||
<Setter Target="avatar.Height" Value="50"/>
|
||||
<Setter Target="AppTitle.Visibility" Value="Collapsed"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<TextBlock x:Name="AppTitle" Style="{StaticResource CaptionTextBlockStyle}" Text="FoxTube" Margin="12,8"/>
|
||||
<NavigationView Margin="0,30,0,0" SelectedItem="toHome" Windows10version1803:BackRequested="nav_BackRequested" Windows10version1803:PaneTitle="FoxTube" OpenPaneLength="300" Name="nav" SelectionChanged="nav_SelectionChanged">
|
||||
<NavigationView SelectedItem="toHome" Windows10version1803:BackRequested="nav_BackRequested" Windows10version1803:PaneTitle="FoxTube" OpenPaneLength="300" Name="nav" SelectionChanged="nav_SelectionChanged">
|
||||
|
||||
<NavigationView.MenuItems>
|
||||
<NavigationViewItem x:Uid="/Main/home" Icon="Home" Content="Home" Name="toHome"/>
|
||||
|
||||
@@ -34,67 +34,69 @@
|
||||
<ScrollViewer Margin="0,0,0,50" Name="mainScroll">
|
||||
<StackPanel Orientation="Vertical" Name="mainContent">
|
||||
<local:VideoPlayer/>
|
||||
<StackPanel Margin="10" Name="descriptionPanel">
|
||||
<TextBlock IsTextSelectionEnabled="True" Name="title" Text="[Video title]" FontSize="25" TextWrapping="WrapWholeWords" HorizontalTextAlignment="Start"/>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Padding="0" Background="Transparent" Margin="5" Name="gotoChannel" Click="gotoChannel_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<PersonPicture Name="channelAvatar" Width="90"/>
|
||||
<StackPanel Orientation="Vertical" Grid.Column="1" Padding="5" VerticalAlignment="Center">
|
||||
<TextBlock Name="channelName" Text="[Channel name]" FontSize="18"/>
|
||||
<TextBlock Name="subscribers" Text="[subscribers]" Foreground="Gray" Margin="0,0,0,5"/>
|
||||
<Button Click="subscribe_Click" Grid.Column="2" Height="30" Width="200" Background="Red" Foreground="White" FontSize="14" FontWeight="SemiBold" Content="Subscirbe" Name="subscribe"/>
|
||||
<PivotItem Header="Description" Name="descriptionPanel">
|
||||
<StackPanel Margin="0,10">
|
||||
<TextBlock IsTextSelectionEnabled="True" Name="title" Text="[Video title]" FontSize="25" TextWrapping="WrapWholeWords" HorizontalTextAlignment="Start"/>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Padding="0" Background="Transparent" Margin="5" Name="gotoChannel" Click="gotoChannel_Click">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<PersonPicture Name="channelAvatar" Width="90"/>
|
||||
<StackPanel Orientation="Vertical" Grid.Column="1" Padding="5" VerticalAlignment="Center">
|
||||
<TextBlock Name="channelName" Text="[Channel name]" FontSize="18"/>
|
||||
<TextBlock Name="subscribers" Text="[subscribers]" Foreground="Gray" Margin="0,0,0,5"/>
|
||||
<Button Click="subscribe_Click" Grid.Column="2" Height="30" Width="200" Background="Red" Foreground="White" FontSize="14" FontWeight="SemiBold" Content="Subscirbe" Name="subscribe"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<StackPanel HorizontalAlignment="Stretch" Name="ratingPanel" Grid.Row="1">
|
||||
<TextBlock Name="views" Text="[views]" FontSize="24" Foreground="Gray"/>
|
||||
<ProgressBar Name="rating" Background="Green" Foreground="Red"/>
|
||||
<Grid>
|
||||
<FontIcon Foreground="Gray"
|
||||
</Button>
|
||||
<StackPanel HorizontalAlignment="Stretch" Name="ratingPanel" Grid.Row="1">
|
||||
<TextBlock Name="views" Text="[views]" FontSize="24" Foreground="Gray"/>
|
||||
<ProgressBar Name="rating" Background="Green" Foreground="Red"/>
|
||||
<Grid>
|
||||
<FontIcon Foreground="Gray"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="40"
|
||||
Name="dislike" Tapped="dislike_Click"
|
||||
Glyph=""/>
|
||||
|
||||
<FontIcon Foreground="Gray"
|
||||
<FontIcon Foreground="Gray"
|
||||
HorizontalAlignment="Right"
|
||||
FontSize="40"
|
||||
Name="like" Tapped="like_Click"
|
||||
Glyph=""/>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<TextBlock Foreground="Gray" Text="[dislikes]" Name="dislikes"/>
|
||||
<TextBlock HorizontalAlignment="Right" Foreground="Gray" Text="[likes]" Name="likes"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<TextBlock Name="description" Text="[Description]" IsTextSelectionEnabled="True" TextWrapping="WrapWholeWords"/>
|
||||
<Grid Margin="0,20,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="20"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<TextBlock Foreground="Gray" Text="[dislikes]" Name="dislikes"/>
|
||||
<TextBlock HorizontalAlignment="Right" Foreground="Gray" Text="[likes]" Name="likes"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<TextBlock Name="description" Text="[Description]" IsTextSelectionEnabled="True" TextWrapping="WrapWholeWords"/>
|
||||
<Grid Margin="0,20,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="20"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Text="Published at: "/>
|
||||
<TextBlock Grid.Row="1" Text="Category: "/>
|
||||
<TextBlock Grid.Row="2" Text="License: "/>
|
||||
<TextBlock Text="Published at: "/>
|
||||
<TextBlock Grid.Row="1" Text="Category: "/>
|
||||
<TextBlock Grid.Row="2" Text="License: "/>
|
||||
|
||||
<TextBlock Name="publishedAt" Grid.Column="2" Text="[Publishing date]"/>
|
||||
<TextBlock Name="category" Grid.Column="2" Grid.Row="1" Padding="0" Text="[Category]"/>
|
||||
<TextBlock Name="license" Grid.Column="2" Grid.Row="2" Text="[License type]"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<TextBlock Name="publishedAt" Grid.Column="2" Text="[Publishing date]"/>
|
||||
<TextBlock Name="category" Grid.Column="2" Grid.Row="1" Padding="0" Text="[Category]"/>
|
||||
<TextBlock Name="license" Grid.Column="2" Grid.Row="2" Text="[License type]"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</PivotItem>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user