<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:Bili.App.Controls"
    xmlns:icons="using:Richasy.FluentIcon.Uwp"
    xmlns:loc="using:Bili.App.Resources.Extension"
    xmlns:local="using:Bili.App.Controls.Pgc"
    xmlns:muxc="using:Microsoft.UI.Xaml.Controls">

    <Style x:Key="VerticalEpisodeItemStyle" TargetType="local:EpisodeItem">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:EpisodeItem">
                    <Grid>
                        <Grid.Resources>
                            <Style TargetType="controls:IconTextBlock">
                                <Setter Property="Spacing" Value="4" />
                                <Setter Property="IconFontSize" Value="12" />
                                <Setter Property="FontSize" Value="12" />
                            </Style>
                        </Grid.Resources>
                        <controls:CardPanel
                            x:Name="RootCard"
                            AutomationProperties.Name="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}"
                            Command="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.PlayCommand}"
                            IsChecked="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.IsSelected}"
                            IsEnableCheck="False">

                            <controls:CardPanel.ContextFlyout>
                                <MenuFlyout x:Name="EpisodeFlyout">
                                    <MenuFlyoutItem
                                        x:Name="OpenInBroswerItem"
                                        AutomationProperties.Name="{loc:Locale Name=OpenInBroswer}"
                                        Command="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.OpenInBroswerCommand}"
                                        Text="{loc:Locale Name=OpenInBroswer}">
                                        <MenuFlyoutItem.Icon>
                                            <icons:RegularFluentIcon Symbol="Globe16" />
                                        </MenuFlyoutItem.Icon>
                                    </MenuFlyoutItem>
                                </MenuFlyout>
                            </controls:CardPanel.ContextFlyout>

                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition x:Name="Row1" Height="Auto" />
                                    <RowDefinition x:Name="Row2" Height="*" />
                                </Grid.RowDefinitions>
                                <Grid
                                    x:Name="CoverContainer"
                                    Height="124"
                                    Margin="1,1,1,0"
                                    VerticalAlignment="Center"
                                    CornerRadius="4,4,0,0">
                                    <controls:CommonImageEx
                                        x:Name="CoverImage"
                                        VerticalAlignment="Center"
                                        ImageUrl="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Cover.Uri}"
                                        Stretch="UniformToFill" />

                                    <Grid
                                        x:Name="BadgeContainer"
                                        Margin="0,8,8,0"
                                        Padding="8,4"
                                        HorizontalAlignment="Right"
                                        VerticalAlignment="Top"
                                        Background="{ThemeResource AccentMaskBrush}"
                                        CornerRadius="{StaticResource ControlCornerRadius}"
                                        Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Highlight, Converter={StaticResource ObjectToVisibilityConverter}}">
                                        <TextBlock
                                            Style="{StaticResource CaptionTextBlockStyle}"
                                            Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}"
                                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Highlight}" />
                                    </Grid>
                                </Grid>

                                <Grid
                                    x:Name="ContentContainer"
                                    Grid.Row="1"
                                    Padding="12,8,12,0"
                                    RowSpacing="8">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <TextBlock
                                        x:Name="SubtitleBlock"
                                        Style="{StaticResource CaptionTextBlockStyle}"
                                        VerticalAlignment="Center"
                                        Opacity="0.6"
                                        Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Subtitle}" />

                                    <TextBlock
                                        x:Name="TitleBlock"
                                        Grid.Row="1"
                                        VerticalAlignment="Top"
                                        MaxLines="2"
                                        Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}"
                                        TextTrimming="CharacterEllipsis"
                                        TextWrapping="Wrap">
                                        <ToolTipService.ToolTip>
                                            <ToolTip Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}" IsEnabled="{Binding ElementName=TitleBlock, Path=IsTextTrimmed}" />
                                        </ToolTipService.ToolTip>
                                    </TextBlock>

                                    <StackPanel Grid.Row="2" Orientation="Horizontal">
                                        <controls:IconTextBlock
                                            Margin="0,0,12,0"
                                            Opacity="0.6"
                                            Symbol="PlayCircle16"
                                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.PlayCountText}"
                                            ToolTipService.ToolTip="{loc:Locale Name=PlayCount}"
                                            Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.PlayCountText, Converter={StaticResource ObjectToVisibilityConverter}}" />
                                        <controls:IconTextBlock
                                            Margin="0,0,12,0"
                                            Opacity="0.6"
                                            Symbol="SlideText16"
                                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.DanmakuCountText}"
                                            ToolTipService.ToolTip="{loc:Locale Name=DanmakuCount}"
                                            Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.DanmakuCountText, Converter={StaticResource ObjectToVisibilityConverter}}" />
                                        <controls:IconTextBlock
                                            Margin="0,0,12,0"
                                            Opacity="0.6"
                                            Symbol="RibbonStar20"
                                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.TrackCountText}"
                                            ToolTipService.ToolTip="{loc:Locale Name=TrackCount}"
                                            Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.TrackCountText, Converter={StaticResource ObjectToVisibilityConverter}}" />
                                    </StackPanel>
                                </Grid>
                            </Grid>
                        </controls:CardPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="HorizontalEpisodeItemStyle" TargetType="local:EpisodeItem">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:EpisodeItem">
                    <Grid>
                        <Grid.Resources>
                            <Style TargetType="controls:IconTextBlock">
                                <Setter Property="Spacing" Value="4" />
                                <Setter Property="IconFontSize" Value="12" />
                                <Setter Property="FontSize" Value="12" />
                            </Style>
                        </Grid.Resources>
                        <controls:CardPanel
                            x:Name="RootCard"
                            AutomationProperties.Name="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}"
                            MaxHeight="140"
                            Command="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.PlayCommand}"
                            IsChecked="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.IsSelected}"
                            IsEnableCheck="False"
                            IsEnableHoverAnimation="False">

                            <controls:CardPanel.ContextFlyout>
                                <MenuFlyout x:Name="EpisodeFlyout">
                                    <MenuFlyoutItem
                                        x:Name="OpenInBroswerItem"
                                        AutomationProperties.Name="{loc:Locale Name=OpenInBroswer}"
                                        Command="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.OpenInBroswerCommand}"
                                        Text="{loc:Locale Name=OpenInBroswer}">
                                        <MenuFlyoutItem.Icon>
                                            <icons:RegularFluentIcon Symbol="Globe16" />
                                        </MenuFlyoutItem.Icon>
                                    </MenuFlyoutItem>
                                </MenuFlyout>
                            </controls:CardPanel.ContextFlyout>

                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Grid
                                    x:Name="CoverContainer"
                                    Margin="8"
                                    VerticalAlignment="Stretch"
                                    CornerRadius="{StaticResource ControlCornerRadius}">
                                    <controls:CommonImageEx
                                        x:Name="CoverImage"
                                        Width="180"
                                        VerticalAlignment="Center"
                                        ImageUrl="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Cover.Uri}"
                                        Stretch="UniformToFill" />

                                    <Grid
                                        x:Name="BadgeContainer"
                                        Margin="8,8,0,0"
                                        Padding="8,4"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Top"
                                        Background="{ThemeResource AccentMaskBrush}"
                                        CornerRadius="{StaticResource ControlCornerRadius}"
                                        Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Highlight, Converter={StaticResource ObjectToVisibilityConverter}}">
                                        <TextBlock
                                            Style="{StaticResource CaptionTextBlockStyle}"
                                            Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}"
                                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Highlight}" />
                                    </Grid>
                                </Grid>
                                <Grid
                                    x:Name="ContentContainer"
                                    Grid.Column="1"
                                    Padding="8"
                                    RowSpacing="8">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <TextBlock
                                        x:Name="SubtitleBlock"
                                        Style="{StaticResource CaptionTextBlockStyle}"
                                        VerticalAlignment="Center"
                                        Opacity="0.6"
                                        Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Subtitle}" />

                                    <TextBlock
                                        x:Name="TitleBlock"
                                        Grid.Row="1"
                                        VerticalAlignment="Top"
                                        MaxLines="1"
                                        Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}"
                                        TextTrimming="CharacterEllipsis"
                                        TextWrapping="Wrap">
                                        <ToolTipService.ToolTip>
                                            <ToolTip Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}" IsEnabled="{Binding ElementName=TitleBlock, Path=IsTextTrimmed}" />
                                        </ToolTipService.ToolTip>
                                    </TextBlock>

                                    <StackPanel Grid.Row="3" Orientation="Horizontal">
                                        <controls:IconTextBlock
                                            Margin="0,0,12,0"
                                            Opacity="0.6"
                                            Symbol="PlayCircle16"
                                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.PlayCountText}"
                                            ToolTipService.ToolTip="{loc:Locale Name=PlayCount}"
                                            Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.PlayCountText, Converter={StaticResource ObjectToVisibilityConverter}}" />
                                        <controls:IconTextBlock
                                            Margin="0,0,12,0"
                                            Opacity="0.6"
                                            Symbol="SlideText16"
                                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.DanmakuCountText}"
                                            ToolTipService.ToolTip="{loc:Locale Name=DanmakuCount}"
                                            Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.DanmakuCountText, Converter={StaticResource ObjectToVisibilityConverter}}" />
                                        <controls:IconTextBlock
                                            Margin="0,0,12,0"
                                            Opacity="0.6"
                                            Symbol="RibbonStar20"
                                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.TrackCountText}"
                                            ToolTipService.ToolTip="{loc:Locale Name=TrackCount}"
                                            Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.TrackCountText, Converter={StaticResource ObjectToVisibilityConverter}}" />
                                    </StackPanel>
                                </Grid>
                            </Grid>
                        </controls:CardPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="RankEpisodeItemStyle" TargetType="local:EpisodeItem">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:EpisodeItem">
                    <Grid>
                        <Grid.Resources>
                            <Style TargetType="controls:IconTextBlock">
                                <Setter Property="Spacing" Value="4" />
                                <Setter Property="IconFontSize" Value="12" />
                                <Setter Property="FontSize" Value="12" />
                            </Style>
                        </Grid.Resources>
                        <controls:CardPanel
                            x:Name="RootCard"
                            AutomationProperties.Name="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}"
                            MaxHeight="128"
                            Background="Transparent"
                            BorderBrush="Transparent"
                            BorderThickness="0"
                            Command="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.PlayCommand}"
                            IsChecked="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.IsSelected}"
                            IsEnableCheck="False"
                            IsEnableHoverAnimation="False">

                            <controls:CardPanel.ContextFlyout>
                                <MenuFlyout x:Name="EpisodeFlyout">
                                    <MenuFlyoutItem
                                        x:Name="OpenInBroswerItem"
                                        AutomationProperties.Name="{loc:Locale Name=OpenInBroswer}"
                                        Command="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.OpenInBroswerCommand}"
                                        Text="{loc:Locale Name=OpenInBroswer}">
                                        <MenuFlyoutItem.Icon>
                                            <icons:RegularFluentIcon Symbol="Globe16" />
                                        </MenuFlyoutItem.Icon>
                                    </MenuFlyoutItem>
                                </MenuFlyout>
                            </controls:CardPanel.ContextFlyout>

                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Grid
                                    x:Name="CoverContainer"
                                    Margin="8"
                                    VerticalAlignment="Stretch"
                                    CornerRadius="{StaticResource ControlCornerRadius}">
                                    <controls:CommonImageEx
                                        x:Name="CoverImage"
                                        Width="120"
                                        VerticalAlignment="Center"
                                        ImageUrl="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Cover.Uri}"
                                        Stretch="UniformToFill" />
                                </Grid>
                                <Grid
                                    x:Name="ContentContainer"
                                    Grid.Column="1"
                                    Padding="8"
                                    RowSpacing="8">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <TextBlock
                                        x:Name="TitleBlock"
                                        VerticalAlignment="Top"
                                        FontWeight="SemiBold"
                                        MaxLines="1"
                                        Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}"
                                        TextTrimming="CharacterEllipsis"
                                        TextWrapping="Wrap">
                                        <ToolTipService.ToolTip>
                                            <ToolTip Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}" IsEnabled="{Binding ElementName=TitleBlock, Path=IsTextTrimmed}" />
                                        </ToolTipService.ToolTip>
                                    </TextBlock>

                                    <Grid
                                        x:Name="BadgeContainer"
                                        Grid.Row="1"
                                        Padding="6,4"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        Background="{ThemeResource AccentBadgeBackground}"
                                        CornerRadius="{StaticResource ControlCornerRadius}"
                                        Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Highlight, Converter={StaticResource ObjectToVisibilityConverter}}">
                                        <TextBlock
                                            Style="{StaticResource CaptionTextBlockStyle}"
                                            FontSize="10"
                                            Foreground="{ThemeResource AccentFillColorDefaultBrush}"
                                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Highlight}" />
                                    </Grid>

                                    <TextBlock
                                        x:Name="SubtitleBlock"
                                        Style="{StaticResource CaptionTextBlockStyle}"
                                        Grid.Row="2"
                                        VerticalAlignment="Center"
                                        Opacity="0.6"
                                        Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Subtitle}" />
                                </Grid>
                            </Grid>
                        </controls:CardPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="VerticalDynamicEpisodeItemStyle" TargetType="local:EpisodeItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:EpisodeItem">
                    <Grid>
                        <Grid.Resources>
                            <Style TargetType="controls:IconTextBlock">
                                <Setter Property="Spacing" Value="4" />
                                <Setter Property="IconFontSize" Value="12" />
                                <Setter Property="FontSize" Value="12" />
                            </Style>
                        </Grid.Resources>
                        <Grid RowSpacing="8">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid
                                x:Name="CoverContainer"
                                Height="200"
                                VerticalAlignment="Stretch"
                                CornerRadius="4">
                                <controls:CommonImageEx x:Name="CoverImage" ImageUrl="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Cover.Uri, Mode=OneWay}" />

                                <Grid
                                    x:Name="DurationContainer"
                                    Margin="8,0,0,8"
                                    Padding="8,4"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Bottom"
                                    Background="{ThemeResource AppMaskBrush}"
                                    CornerRadius="{StaticResource ControlCornerRadius}"
                                    RequestedTheme="Dark">
                                    <TextBlock Style="{StaticResource CaptionTextBlockStyle}" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.DurationText}" />
                                </Grid>

                                <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Ellipse
                                        Width="40"
                                        Height="40"
                                        Fill="{ThemeResource AppMaskBrush}"
                                        Opacity="0.8" />
                                    <icons:RegularFluentIcon
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        FontSize="16"
                                        Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}"
                                        Symbol="Play16" />
                                </Grid>
                            </Grid>


                            <Grid
                                x:Name="ContentContainer"
                                Grid.Row="1"
                                RowSpacing="4">
                                <Grid.RowDefinitions>
                                    <RowDefinition x:Name="ContentRow" Height="*" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>

                                <TextBlock
                                    x:Name="TitleBlock"
                                    VerticalAlignment="Top"
                                    FontSize="12"
                                    MaxLines="2"
                                    Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}"
                                    TextTrimming="CharacterEllipsis"
                                    TextWrapping="Wrap">
                                    <ToolTipService.ToolTip>
                                        <ToolTip Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}" IsEnabled="{Binding ElementName=TitleBlock, Path=IsTextTrimmed}" />
                                    </ToolTipService.ToolTip>
                                </TextBlock>
                            </Grid>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="HorizontalDynamicEpisodeItemStyle" TargetType="local:EpisodeItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:EpisodeItem">
                    <Grid RowSpacing="8">
                        <Grid.Resources>
                            <Style TargetType="controls:IconTextBlock">
                                <Setter Property="Spacing" Value="4" />
                                <Setter Property="IconFontSize" Value="12" />
                                <Setter Property="FontSize" Value="12" />
                            </Style>
                        </Grid.Resources>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid
                            x:Name="CoverContainer"
                            Width="120"
                            Height="76"
                            VerticalAlignment="Stretch"
                            CornerRadius="{StaticResource ControlCornerRadius}">
                            <controls:CommonImageEx x:Name="CoverImage" ImageUrl="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Cover.Uri}" />

                            <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                                <Ellipse
                                    Width="40"
                                    Height="40"
                                    Fill="{ThemeResource AppMaskBrush}"
                                    Opacity="0.8" />
                                <icons:RegularFluentIcon
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    FontSize="16"
                                    Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}"
                                    Symbol="Play16" />
                            </Grid>
                        </Grid>

                        <Grid
                            x:Name="ContentContainer"
                            Grid.Column="1"
                            Padding="8"
                            RowSpacing="4">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>

                            <TextBlock
                                x:Name="TitleBlock"
                                VerticalAlignment="Top"
                                FontSize="12"
                                MaxLines="2"
                                Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}"
                                TextTrimming="CharacterEllipsis"
                                TextWrapping="Wrap">
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Data.Identifier.Title}" IsEnabled="{Binding ElementName=TitleBlock, Path=IsTextTrimmed}" />
                                </ToolTipService.ToolTip>
                            </TextBlock>

                            <controls:IconTextBlock
                                x:Name="InlineDurationBlock"
                                Grid.Row="1"
                                FontSize="12"
                                Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                                IconFontSize="12"
                                Symbol="Timer16"
                                Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.DurationText, Mode=OneWay}"
                                Visibility="Collapsed" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style BasedOn="{StaticResource VerticalEpisodeItemStyle}" TargetType="local:EpisodeItem" />

</ResourceDictionary>
