<local:MusicContentPage
    x:Class="was.droidtransfer.features.music.MusicContentAlbumDetailPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:was.droidtransfer.features.music"
    xmlns:converters="using:was.droidtransfer.features.music.converters"
    xmlns:coreconverters="using:was.droidtransfer.features.converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" x:DefaultBindMode="OneWay"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
    NavigationCacheMode="Enabled">
    <Page.Resources>
        <ResourceDictionary>
            <converters:AlbumToPlaybackInfoConverter x:Key="AlbumToPlaybackInfoConverter" />
            <converters:BoolToOpacitiyForMediaConverter x:Key="BoolToOpacitiyForMediaConverter" />
            <coreconverters:ValueToVisibilityConverter x:Key="ValueToVisibilityConverter" />
        </ResourceDictionary>
    </Page.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Border Background="{ThemeResource CardBackgroundFillColorDefault}" CornerRadius="5" BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" BorderThickness="0.5" Margin="4,10,4,10" Padding="20">
            <Grid ColumnSpacing="20">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Border x:Name="artworkBorder" Width="150" Height="150" BorderThickness="1" BorderBrush="{ThemeResource TextFillColorDisabledBrush}" CornerRadius="8" Background="{ThemeResource TextFillColorInverse}" PointerEntered="_border_PointerEntered" PointerExited="_border_PointerExited">
                    <Grid ColumnSpacing="20">
                        <FontIcon x:Name="placeholderFontIcon" Glyph="&#xE93C;" FontSize="28" Opacity=".8" Foreground="{ThemeResource TextFillColorPrimary}" />
                        <Image x:Name="artworkImage" Width="150" Height="150" Opacity="{x:Bind Album.ContainsOnlyRemoteTracks, Converter={StaticResource BoolToOpacitiyForMediaConverter}}"/>
                        <Border x:Name="albumPlayButton" HorizontalAlignment="Right" VerticalAlignment="Bottom" Padding="10" Margin="10" CornerRadius="64" Background="{ThemeResource TextFillColorInverse}" Visibility="Collapsed" Tapped="_albumPlayButton_Tapped" DataContext="{x:Bind}">
                            <FontIcon Glyph="&#xE768;" Foreground="{ThemeResource TextFillColorPrimary}" />
                        </Border>
                        <Border HorizontalAlignment="Left" VerticalAlignment="Top" Padding="8,8,10,8" CornerRadius="0,0,12,0" Background="{ThemeResource TextFillColorInverse}" Visibility="{x:Bind Album.ContainsOnlyRemoteTracks, Converter={StaticResource ValueToVisibilityConverter}}">
                            <FontIcon Glyph="&#xE753;" FontSize="16" FontWeight="Bold" Foreground="{ThemeResource TextFillColorPrimary}">
                                <ToolTipService.ToolTip>
                                    <ToolTip x:Uid="AlbumIsRemoteToolTip" />
                                </ToolTipService.ToolTip>
                            </FontIcon>
                        </Border>
                    </Grid>
                </Border>
                <StackPanel Grid.Column="1" VerticalAlignment="Center">
                    <TextBlock Text="{x:Bind Album, Converter={StaticResource AlbumToPlaybackInfoConverter}, ConverterParameter='[name]'}" FontWeight="Bold" FontSize="26" TextTrimming="CharacterEllipsis" />
                    <TextBlock Text="{x:Bind Album, Converter={StaticResource AlbumToPlaybackInfoConverter}, ConverterParameter='[artist]'}" Margin="0,8,0,0" FontWeight="SemiBold" FontSize="18" TextTrimming="CharacterEllipsis" />
                    <TextBlock Text="{x:Bind Album, Converter={StaticResource AlbumToPlaybackInfoConverter}, ConverterParameter='[year] - [genre] - [trackcount] - [runtime]'}" Margin="0,8,0,0" Opacity=".7" TextTrimming="CharacterEllipsis" />
                    <Button x:Name="buttonPlayAlbum" Style="{StaticResource AccentButtonStyle}" Margin="0,24,0,0" Click="_playAlbumButton_Click">
                        <StackPanel Orientation="Horizontal" Spacing="5">
                            <FontIcon x:Name="buttonPlayAlbumFontIcon" Glyph="&#xE768;" Foreground="{Binding Foreground, ElementName=buttonPlayAlbumTextBlock}" />
                            <TextBlock x:Name="buttonPlayAlbumTextBlock" x:Uid="ButtonPlayAlbumLabel" Text="XX Play" />
                        </StackPanel>
                    </Button>
                </StackPanel>
            </Grid>
        </Border>
        <local:MusicContentSongsPage x:Name="songsPage" Grid.Row="1" />
    </Grid>
</local:MusicContentPage>
