<?xml version="1.0" encoding="utf-8"?>
<UserControl
    x:Class="was.droidtransfer.features.clipboard.controls.ClipboardDataListViewItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="using:was.droidtransfer.features.clipboard.converters"
    xmlns:commonclipboard="using:was.android.connect.common.clipboard"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DataContext="{d:DesignInstance Type=commonclipboard:ClipboardData}"
    MinWidth="200" PointerEntered="_pointerEntered" PointerExited="_pointerExited" Margin="-10,0">
    <UserControl.Resources>
        <ResourceDictionary>
            <converters:ClipboardDataTypeToStringConverter x:Key="ClipboardDataTypeToStringConverter" />
        </ResourceDictionary>
    </UserControl.Resources>
    <UserControl.ContextFlyout>
        <MenuFlyout>
            <MenuFlyoutItem x:Uid="MenuFlyoutItemSaveToPC" Text="XX Save to PC" Click="_menuFlyoutItemSaveToPC_Click">
                <MenuFlyoutItem.Icon>
                    <FontIcon Glyph="&#xE78C;" />
                </MenuFlyoutItem.Icon>
            </MenuFlyoutItem>
            <MenuFlyoutItem x:Uid="MenuFlyoutItemWindowsClipboard" Text="XX Send to Windows Clipboard" Click="_menuFlyoutItemWindowsClipboard_Click">
                <MenuFlyoutItem.Icon>
                    <FontIcon Glyph="&#xE896;" />
                </MenuFlyoutItem.Icon>
            </MenuFlyoutItem>
            <MenuFlyoutItem x:Uid="MenuFlyoutItemDeviceClipboard" Text="XX Send to Device Clipboard" Click="_menuFlyoutItemDeviceClipboard_Click">
                <MenuFlyoutItem.Icon>
                    <FontIcon Glyph="&#xE898;" />
                </MenuFlyoutItem.Icon>
            </MenuFlyoutItem>
            <MenuFlyoutSeparator />
            <MenuFlyoutItem x:Uid="MenuFlyoutItemRefresh" Text="XX Refresh" Click="_menuFlyoutItemRefresh_Click">
                <MenuFlyoutItem.Icon>
                    <FontIcon Glyph="&#xE72C;" />
                </MenuFlyoutItem.Icon>
            </MenuFlyoutItem>
        </MenuFlyout>
    </UserControl.ContextFlyout>
    <Border Background="{ThemeResource TextBoxBackgroundThemeBrush}" BorderBrush="{ThemeResource ButtonBorderThemeBrush}" BorderThickness="1" CornerRadius="5">
        <Grid>
            <StackPanel>
                <Border x:Name="borderHeader">
                    <Grid Margin="10,5">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <TextBlock x:Name="textBlockDate" Style="{ThemeResource BodyStrongTextBlockStyle}" Text="{Binding DateTime}" FontSize="12" />
                        <TextBlock x:Name="textBlockDataType" Style="{ThemeResource BodyTextBlockStyle}" Grid.Column="1" Text="{Binding DataType, Converter={StaticResource ClipboardDataTypeToStringConverter}}" FontSize="12" />
                    </Grid>
                </Border>
                <ContentControl x:Name="contentControl" Margin="10" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" />
            </StackPanel>
            <Border Visibility="{x:Bind IsSelected, Mode=OneWay}" Width="2" Background="{ThemeResource SystemAccentColor}" HorizontalAlignment="Left" />
        </Grid>
    </Border>
</UserControl>
