<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary
    x:Class="was.droidtransfer.features.messaging.ux.MessageContentImageCTLDataTemplate"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:was.droidtransfer.features.messaging.ux"
    xmlns:converters="using:was.droidtransfer.features.messaging.converters">
    <converters:MessageContentToIsSupportedConverter x:Key="MessageContentToIsSupportedConverter" />
    <converters:MessageContentToUnsupportedTextConverter x:Key="MessageContentToUnsupportedTextConverter" />
    <DataTemplate x:Key="MessageContentImageCTLDataTemplate">
        <Border Padding="0" Margin="0,0,0,0" CornerRadius="{ThemeResource HyperlinkFocusRectCornerRadius}" Background="Transparent">
            <Grid>
                <Grid x:Name="gridContent" MaxWidth="400" Visibility="{Binding Converter={StaticResource MessageContentToIsSupportedConverter}}">
                    <Border Background="{ThemeResource AppBarBackgroundThemeBrush}" PointerPressed="_borderContent_PointerPressed" Width="400" Height="250">
                        <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Padding="10" Spacing="5">
                            <FontIcon Glyph="&#xEB9F;" />
                            <TextBlock x:Uid="TextBlockImageClickToView" Text="Image: Click to View" TextWrapping="WrapWholeWords" TextAlignment="Center" />
                        </StackPanel>
                    </Border>
                </Grid>
                <Border BorderThickness="4,0,0,0" BorderBrush="{ThemeResource SystemErrorTextColor}" HorizontalAlignment="Stretch" Padding="8,2,4,8" Background="{ThemeResource TextFillColorInverse}" CornerRadius="0,4,4,0" Visibility="{Binding Converter={StaticResource MessageContentToIsSupportedConverter}, ConverterParameter='invert'}" Margin="0,0,0,4">
                    <StackPanel Spacing="5">
                        <TextBlock Style="{ThemeResource BodyStrongTextBlockStyle}" Text="{Binding Converter={StaticResource MessageContentToUnsupportedTextConverter}}" Padding="0" Margin="0" Foreground="{ThemeResource SystemErrorTextColor}" />
                        <TextBlock x:Uid="TextBlockUnsupportedImageDescription" TextWrapping="Wrap" Text="XX This image format cannot be previewed but can be saved to your PC." Padding="0" Margin="0" />
                        <Button x:Uid="ButtonUnsupportedSaveToPC" Margin="0,10,0,0" Content="XX Save to PC" Click="_saveToPCButton_Click" />
                    </StackPanel>
                </Border>
            </Grid>
        </Border>
    </DataTemplate>
</ResourceDictionary>
