|
| 1 | +<UserControl |
| 2 | + x:Class="Richasy.Bili.App.Controls.PgcPlayListView" |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:loc="using:Richasy.Bili.Locator.Uwp" |
| 7 | + xmlns:local="using:Richasy.Bili.App.Controls" |
| 8 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 9 | + xmlns:muxc="using:Microsoft.UI.Xaml.Controls" |
| 10 | + xmlns:uwp="using:Richasy.Bili.ViewModels.Uwp" |
| 11 | + d:DesignHeight="300" |
| 12 | + d:DesignWidth="400" |
| 13 | + mc:Ignorable="d"> |
| 14 | + |
| 15 | + <Grid> |
| 16 | + <VisualStateManager.VisualStateGroups> |
| 17 | + <VisualStateGroup x:Name="LayoutGroup"> |
| 18 | + <VisualState x:Name="CenterState"> |
| 19 | + <VisualState.StateTriggers> |
| 20 | + <AdaptiveTrigger MinWindowWidth="{StaticResource MediumWindowThresholdWidth}" /> |
| 21 | + </VisualState.StateTriggers> |
| 22 | + </VisualState> |
| 23 | + <VisualState x:Name="BottomState"> |
| 24 | + <VisualState.StateTriggers> |
| 25 | + <AdaptiveTrigger MinWindowWidth="0" /> |
| 26 | + </VisualState.StateTriggers> |
| 27 | + <VisualState.Setters> |
| 28 | + <Setter Target="Container.PreferredPlacement" Value="Bottom" /> |
| 29 | + </VisualState.Setters> |
| 30 | + </VisualState> |
| 31 | + </VisualStateGroup> |
| 32 | + </VisualStateManager.VisualStateGroups> |
| 33 | + <muxc:TeachingTip |
| 34 | + x:Name="Container" |
| 35 | + VerticalAlignment="Stretch" |
| 36 | + Closed="OnContainerClosed" |
| 37 | + IsLightDismissEnabled="True" |
| 38 | + PreferredPlacement="Center" |
| 39 | + ShouldConstrainToRootBounds="False"> |
| 40 | + <muxc:TeachingTip.HeroContent> |
| 41 | + <Grid |
| 42 | + Padding="20,16,20,12" |
| 43 | + RowSpacing="4" |
| 44 | + Visibility="{x:Bind ViewModel.IsInitializeLoading, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}"> |
| 45 | + <Grid.RowDefinitions> |
| 46 | + <RowDefinition Height="Auto" /> |
| 47 | + <RowDefinition Height="Auto" /> |
| 48 | + </Grid.RowDefinitions> |
| 49 | + <TextBlock |
| 50 | + Style="{StaticResource SubtitleTextBlockStyle}" |
| 51 | + HorizontalAlignment="Left" |
| 52 | + Text="{x:Bind ViewModel.Title, Mode=OneWay}" /> |
| 53 | + <TextBlock |
| 54 | + Style="{StaticResource CaptionTextBlockStyle}" |
| 55 | + Grid.Row="1" |
| 56 | + HorizontalAlignment="Left" |
| 57 | + Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
| 58 | + Text="{x:Bind ViewModel.TotalCount, Mode=OneWay}" |
| 59 | + TextWrapping="Wrap" /> |
| 60 | + </Grid> |
| 61 | + </muxc:TeachingTip.HeroContent> |
| 62 | + <Grid Width="400" Margin="0,-12,0,0"> |
| 63 | + <Grid> |
| 64 | + <local:VerticalRepeaterView |
| 65 | + x:Name="SeasonView" |
| 66 | + Grid.Row="2" |
| 67 | + Margin="0,0,0,12" |
| 68 | + Background="Transparent" |
| 69 | + HeaderVisibility="Collapsed" |
| 70 | + ItemOrientation="Horizontal" |
| 71 | + ItemsSource="{x:Bind ViewModel.SeasonCollection, Mode=OneWay}" |
| 72 | + Visibility="{x:Bind ViewModel.IsInitializeLoading, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}"> |
| 73 | + <local:VerticalRepeaterView.ItemTemplate> |
| 74 | + <DataTemplate x:DataType="uwp:SeasonViewModel"> |
| 75 | + <local:PgcItem |
| 76 | + CoverHeight="140" |
| 77 | + CoverWidth="100" |
| 78 | + ItemClick="OnItemClick" |
| 79 | + TitleRowHeight="28" |
| 80 | + ViewModel="{x:Bind}"> |
| 81 | + <local:PgcItem.CardStyle> |
| 82 | + <Style TargetType="local:CardPanel"> |
| 83 | + <Setter Property="IsEnableHoverAnimation" Value="False" /> |
| 84 | + <Setter Property="IsEnableShadow" Value="False" /> |
| 85 | + </Style> |
| 86 | + </local:PgcItem.CardStyle> |
| 87 | + </local:PgcItem> |
| 88 | + </DataTemplate> |
| 89 | + </local:VerticalRepeaterView.ItemTemplate> |
| 90 | + </local:VerticalRepeaterView> |
| 91 | + <local:OverlayLoadingPanel |
| 92 | + MinHeight="80" |
| 93 | + IsBarActive="{x:Bind ViewModel.IsDeltaLoading, Mode=OneWay}" |
| 94 | + IsRingActive="{x:Bind ViewModel.IsInitializeLoading, Mode=OneWay}" /> |
| 95 | + <local:ErrorPanel |
| 96 | + x:Name="ErrorPanel" |
| 97 | + ActionButtonClick="OnRefreshButtonClickAsync" |
| 98 | + ActionContent="{loc:LocaleLocator Name=Refresh}" |
| 99 | + Text="{x:Bind ViewModel.ErrorText, Mode=OneWay}" |
| 100 | + Visibility="{x:Bind ViewModel.IsError, Mode=OneWay}" /> |
| 101 | + </Grid> |
| 102 | + </Grid> |
| 103 | + </muxc:TeachingTip> |
| 104 | + </Grid> |
| 105 | +</UserControl> |
0 commit comments