Archived
1
0

Playlist page markup & adaptive triggers

This commit is contained in:
Michael Gordeev
2018-07-27 00:07:48 +03:00
parent 129ce17d2a
commit 98c7ce1735
7 changed files with 80 additions and 46 deletions
+1 -1
View File
@@ -270,7 +270,7 @@ namespace FoxTube
if (s == toHistory)
content.Navigate(typeof(Settings));
else if (s == toLiked)
content.Navigate(typeof(Settings));
content.Navigate(typeof(PlaylistPage));
else if (s == toLater)
content.Navigate(typeof(Settings));
else if (s == toSubscriptions)
-40
View File
@@ -1,40 +0,0 @@
<Page
x:Class="FoxTube.Pages.Playlist"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FoxTube.Pages"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" Margin="20" Grid.Column="0" MaxWidth="650">
<Image Source="/Assets/videoThumbSample.png"/>
<TextBlock FontSize="36" Text="[Title]" TextWrapping="WrapWholeWords"/>
<TextBlock Foreground="Gray" Text="# videos | # views | Updated at: ##-##-## ##:##:##" FontSize="26"/>
</StackPanel>
<CommandBar Grid.Row="2" Grid.ColumnSpan="2">
<AppBarButton Icon="Globe" Label="Open in browser"/>
<AppBarButton Icon="Add" Label="Add to">
<AppBarButton.Flyout>
<MenuFlyout>
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton>
<AppBarButton Icon="Refresh" Label="Refresh"/>
</CommandBar>
</Grid>
</Page>
+68
View File
@@ -0,0 +1,68 @@
<Page
x:Class="FoxTube.Pages.PlaylistPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FoxTube.Pages"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<ScrollViewer>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="800"/>
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="cover.(Grid.Column)" Value="0"/>
<Setter Target="cover.(Grid.Row)" Value="1"/>
<Setter Target="cover.(MaxWidth)" Value="300"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="20" Grid.Column="1" x:Name="cover" HorizontalAlignment="Left">
<Image Source="/Assets/videoThumbSample.png"/>
<TextBlock FontSize="20" Text="[Title]" TextWrapping="WrapWholeWords"/>
<TextBlock Foreground="Gray" Text="# videos | # views | Updated at: ##-##-## ##:##:##" TextWrapping="WrapWholeWords"/>
<Button Margin="0,10,0,0" Background="Transparent">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<PersonPicture Height="50"/>
<TextBlock Grid.Column="1" Text="Channel name" FontSize="18" VerticalAlignment="Center" Margin="10,0,0,0" TextWrapping="WrapWholeWords"/>
</Grid>
</Button>
</StackPanel>
<local:VideoGrid Grid.Column="1" Grid.Row="1"/>
<CommandBar Grid.Row="2" Grid.ColumnSpan="2">
<AppBarButton Icon="Globe" Label="Open in browser"/>
<AppBarButton Icon="Add" Label="Add to">
<AppBarButton.Flyout>
<MenuFlyout>
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton>
<AppBarButton Icon="Refresh" Label="Refresh"/>
</CommandBar>
</Grid>
</ScrollViewer>
</Page>
@@ -20,9 +20,9 @@ namespace FoxTube.Pages
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class Playlist : Page
public sealed partial class PlaylistPage : Page
{
public Playlist()
public PlaylistPage()
{
this.InitializeComponent();
}
+1
View File
@@ -73,6 +73,7 @@
</ScrollViewer>
<CommandBar Grid.Row="1" DefaultLabelPosition="Right">
<AppBarButton Label="Open in browser" Icon="Globe" Name="inBrowser" Click="inBrowser_Click" IsEnabled="False"/>
<AppBarButton Label="Refresh" Icon="Refresh" Click="AppBarButton_Click"/>
</CommandBar>
+5
View File
@@ -280,5 +280,10 @@ namespace FoxTube
}
catch (NullReferenceException) { }
}
private void inBrowser_Click(object sender, RoutedEventArgs e)
{
}
}
}