<!-- Copyright (c) Microsoft Corporation and Contributors. -->
<!-- Licensed under the MIT License. -->

<UserControl
    x:Class="was.touchcopy.features.controls.BackupFileImageGrid"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:was.touchcopy.features.controls"
    xmlns:devicebackup="using:was.apple.mobiledevicebackup"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <GridView x:Name="gridView" ContainerContentChanging="_gridView_ContainerContentChanging" IsItemClickEnabled="True" DoubleTapped="_gridView_DoubleTapped" ItemsSource="{x:Bind Items, Mode=OneWay}" SelectionMode="Extended" PreviewKeyDown="_gridView_PreviewKeyDown" RightTapped="_gridView_RightTapped">
        <GridView.ItemTemplate>
            <DataTemplate x:DataType="devicebackup:BackupFile">
                <Border CornerRadius="10">
                    <local:BackupFileImageGridItem x:Name="imageGridItem" Width="190" Height="120"/>
                </Border>
            </DataTemplate>
        </GridView.ItemTemplate>
        <GridView.ContextFlyout>
            <MenuFlyout>
                <MenuFlyoutItem x:Uid="MenuFlyoutItemView" Text="XX View" Click="_menuFlyoutItemView_Click">
                    <MenuFlyoutItem.Icon>
                        <FontIcon Glyph="&#xE890;" />
                    </MenuFlyoutItem.Icon>
                </MenuFlyoutItem>
                <MenuFlyoutItem x:Uid="MenuFlyoutItemSaveToPC" Text="XX Save to PC" Click="_menuFlyoutItemSave_Click">
                    <MenuFlyoutItem.Icon>
                        <FontIcon Glyph="&#xE78C;" />
                    </MenuFlyoutItem.Icon>
                </MenuFlyoutItem>
            </MenuFlyout>
        </GridView.ContextFlyout>
    </GridView>
</UserControl>
