<?xml version="1.0" encoding="utf-8"?>
<featurebase:FeaturePage
    x:Class="was.droidtransfer.features.files.FilesFeaturePage"
    xmlns:featurebase="using:was.droidtransfer.features"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:was.droidtransfer.features.files"
    xmlns:controls="using:was.droidtransfer.features.controls"
    xmlns:converters="using:was.droidtransfer.features.files.converters"
    xmlns:fconverters="using:was.droidtransfer.features.converters"
    xmlns:data="using:was.droidtransfer.features.files.data"
    xmlns:dialogs="using:was.droidtransfer.features.dialogs"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>
        <ResourceDictionary>
            <converters:DeviceEntriesToSortedDataSourceConverter x:Key="DeviceEntriesToSortedDataSourceConverter"/>
            <converters:BooleanToFolderFontIconGlyphConverter x:Key="BooleanToFolderFontIconGlyphConverter" />
            <converters:DeviceEntryToFileIconConverter x:Key="DeviceEntryToFileIconConverter" />
            <converters:FileViewModeToIsCheckedBoolConverter x:Key="FileViewModeToIsCheckedBoolConverter" />
            <converters:DeviceEntryToSizeStringConverter x:Key="DeviceEntryToSizeStringConverter" />
            <fconverters:EnumerableCountToVisibilityConverter x:Key="EnumerableCountToVisibilityConverter" />
            <fconverters:ValueToVisibilityConverter x:Key="ValueToVisibilityConverter" />
            <fconverters:VisibilityInverter x:Key="VisibilityInverter" />
            <DataTemplate x:Key="FilesTileViewDataTemplate" x:DataType="data:IDeviceEntry">
                <Grid MinWidth="200" Padding="8,12" HorizontalAlignment="Stretch" AllowDrop="True" DragOver="_gridViewItem_DragOver" Drop="_gridViewItem_Drop">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="48" />
                        <ColumnDefinition Width="4" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Image Height="48" Width="48" Stretch="Uniform" Source="{Binding Converter={StaticResource DeviceEntryToFileIconConverter}}" Opacity="{Binding Opacity}"/>
                    <Border Visibility="{Binding IsHidden, Converter={StaticResource ValueToVisibilityConverter}, TargetNullValue=collapsed}" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="4">
                        <FontIcon Glyph="&#xED1A;" MaxWidth="48" VerticalAlignment="Center" Foreground="{ThemeResource TextFillColorPrimary}" />
                    </Border>
                    <StackPanel Grid.Column="2" Orientation="Vertical" VerticalAlignment="Center" Opacity="{Binding Opacity}">
                        <TextBlock Text="{Binding Name}" TextAlignment="Left" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" />
                        <TextBlock Text="{Binding Converter={StaticResource DeviceEntryToSizeStringConverter}}" TextAlignment="Left" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Opacity="0.6" Visibility="{Binding Size, Converter={StaticResource ValueToVisibilityConverter}}" />
                    </StackPanel>
                </Grid>
            </DataTemplate>
            <DataTemplate x:Key="FilesListViewDataTemplate" x:DataType="data:IDeviceEntry">
                <Grid Width="{Binding ActualWidth, ElementName=gridViewEntries, Mode=OneWay}" Padding="8,0,16,0" MinHeight="0" Height="auto" AllowDrop="True" DragOver="_gridViewItem_DragOver" Drop="_gridViewItem_Drop">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="16" />
                        <ColumnDefinition Width="8" />
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="16" />
                    </Grid.ColumnDefinitions>
                    <Image Height="16" Width="16" Stretch="Uniform" Source="{Binding Converter={StaticResource DeviceEntryToFileIconConverter}, ConverterParameter=16}" Opacity="{Binding Opacity}" Visibility="{Binding IsHidden, Converter={StaticResource ValueToVisibilityConverter}, ConverterParameter='invert', TargetNullValue=visible}" />
                    <Border Visibility="{Binding IsHidden, Converter={StaticResource ValueToVisibilityConverter}, TargetNullValue=collapsed}" VerticalAlignment="Center" HorizontalAlignment="Center">
                        <FontIcon Glyph="&#xED1A;" MaxWidth="16" VerticalAlignment="Center" FontSize="10" Foreground="{ThemeResource TextFillColorPrimary}" />
                    </Border>
                    <TextBlock Grid.Column="2" Text="{Binding Name}" TextAlignment="Left" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" Margin="0,0,0,2" Opacity="{Binding Opacity}" />
                    <TextBlock Grid.Column="4" Text="{x:Bind Converter={StaticResource DeviceEntryToSizeStringConverter}}" TextAlignment="Left" TextWrapping="NoWrap" VerticalAlignment="Center" Opacity="0.5" Visibility="{Binding Size, Converter={StaticResource ValueToVisibilityConverter}}" />
                </Grid>
            </DataTemplate>
            <DataTemplate x:Key="FilesSmallSizedIconViewDataTemplate" x:DataType="data:IDeviceEntry">
                <Grid Width="250" Padding="8,0" AllowDrop="True" DragOver="_gridViewItem_DragOver" Drop="_gridViewItem_Drop">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="16" />
                        <ColumnDefinition Width="4" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Image Height="16" Width="16" Stretch="Uniform" Source="{Binding Converter={StaticResource DeviceEntryToFileIconConverter},ConverterParameter=16}" Opacity="{Binding Opacity}" Visibility="{Binding IsHidden, Converter={StaticResource ValueToVisibilityConverter}, ConverterParameter='invert', TargetNullValue=visible}" />
                    <Border Visibility="{Binding IsHidden, Converter={StaticResource ValueToVisibilityConverter}, TargetNullValue=collapsed}" VerticalAlignment="Center" HorizontalAlignment="Center">
                        <FontIcon Glyph="&#xED1A;" MaxWidth="16" VerticalAlignment="Center" FontSize="10" Foreground="{ThemeResource TextFillColorPrimary}" />
                    </Border>
                    <TextBlock Grid.Column="2" Text="{Binding Name}" TextAlignment="Left" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" Margin="0,0,0,2" Opacity="{Binding Opacity}" />
                </Grid>
            </DataTemplate>
            <DataTemplate x:Key="FilesMediumSizedIconViewDataTemplate" x:DataType="data:IDeviceEntry">
                <Grid MinWidth="150" Padding="8,12" AllowDrop="True" DragOver="_gridViewItem_DragOver" Drop="_gridViewItem_Drop">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="48" />
                        <RowDefinition Height="8" />
                        <RowDefinition Height="38" />
                    </Grid.RowDefinitions>
                    <Image Height="48" Width="48" Stretch="Uniform" Source="{Binding Converter={StaticResource DeviceEntryToFileIconConverter}}" Opacity="{Binding Opacity}" />
                    <Border Visibility="{Binding IsHidden, Converter={StaticResource ValueToVisibilityConverter}, TargetNullValue=collapsed}" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="4">
                        <FontIcon Glyph="&#xED1A;" MaxWidth="48" VerticalAlignment="Center" Foreground="{ThemeResource TextFillColorPrimary}" />
                    </Border>
                    <TextBlock Grid.Row="2" Text="{Binding Name}" TextAlignment="Center" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Opacity="{Binding Opacity}" />
                </Grid>
            </DataTemplate>
            <DataTemplate x:Key="FilesLargeSizedIconViewDataTemplate" x:DataType="data:IDeviceEntry">
                <Grid MinWidth="200" Padding="8,12" AllowDrop="True" DragOver="_gridViewItem_DragOver" Drop="_gridViewItem_Drop" Opacity="{Binding Opacity}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="96" />
                        <RowDefinition Height="8" />
                        <RowDefinition Height="38" />
                    </Grid.RowDefinitions>
                    <Image Height="96" Width="96" Stretch="Uniform" Source="{Binding Converter={StaticResource DeviceEntryToFileIconConverter}, ConverterParameter=96}" Opacity="{Binding Opacity}" />
                    <Border Visibility="{Binding IsHidden, Converter={StaticResource ValueToVisibilityConverter}, TargetNullValue=collapsed}" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="4">
                        <FontIcon Glyph="&#xED1A;" MaxWidth="96" VerticalAlignment="Center" Foreground="{ThemeResource TextFillColorPrimary}" />
                    </Border>
                    <TextBlock Grid.Row="2" Text="{Binding Name}" TextAlignment="Center" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Opacity="{Binding Opacity}" />
                </Grid>
            </DataTemplate>
        </ResourceDictionary>
    </Page.Resources>
    <Grid x:Name="gridRoot" Visibility="Collapsed">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border Style="{ThemeResource PageHeaderBorderStyle}">
            <Grid>
                <CommandBar Style="{ThemeResource PageHeaderCommandBarStyle}">
                    <featurebase:CopyProgressAppBarUserController x:Name="copyProgressUserControl" Visibility="Collapsed" OnCancelTapped="_copyProgressUserControl_OnCancelTapped" MaxWidth="350" />
                    <AppBarButton x:Uid="ChangeViewButton" Label="XX View" Style="{ThemeResource AppBarButtonStyle}">
                        <AppBarButton.Icon>
                            <FontIcon Glyph="&#xF0E2;" Foreground="{ThemeResource AccentFillColorDefaultBrush}" />
                        </AppBarButton.Icon>
                        <AppBarButton.Flyout>
                            <MenuFlyout Placement="Bottom">
                                <ToggleMenuFlyoutItem x:Uid="ViewLargeIconsMenuFlyoutIcon" Text="XX Large Icons" Tag="4" Click="_viewModeToggleMenuFlyoutItem_Click" 
                                                  IsChecked="{x:Bind ViewMode, Converter={StaticResource FileViewModeToIsCheckedBoolConverter}, ConverterParameter=4, Mode=OneWay}" />
                                <ToggleMenuFlyoutItem x:Uid="ViewMediumIconsMenuFlyoutIcon" Text="XX Medium-Sized Icons" Tag="3" Click="_viewModeToggleMenuFlyoutItem_Click"
                                                  IsChecked="{x:Bind ViewMode, Converter={StaticResource FileViewModeToIsCheckedBoolConverter}, ConverterParameter=3, Mode=OneWay}" />
                                <ToggleMenuFlyoutItem x:Uid="ViewSmallIconsMenuFlyoutIcon" Text="XX Small Icons" Tag="2" Click="_viewModeToggleMenuFlyoutItem_Click"
                                                  IsChecked="{x:Bind ViewMode, Converter={StaticResource FileViewModeToIsCheckedBoolConverter}, ConverterParameter=2, Mode=OneWay}" />
                                <ToggleMenuFlyoutItem x:Uid="ViewListMenuFlyoutIcon" Text="XX List" Tag="1" Click="_viewModeToggleMenuFlyoutItem_Click"
                                                  IsChecked="{x:Bind ViewMode, Converter={StaticResource FileViewModeToIsCheckedBoolConverter}, ConverterParameter=1, Mode=OneWay}" />
                                <ToggleMenuFlyoutItem x:Uid="ViewTilesMenuFlyoutIcon" Text="XX Tiles" Tag="0" Click="_viewModeToggleMenuFlyoutItem_Click"
                                                  IsChecked="{x:Bind ViewMode, Converter={StaticResource FileViewModeToIsCheckedBoolConverter}, ConverterParameter=0, Mode=OneWay}" />
                            </MenuFlyout>
                        </AppBarButton.Flyout>
                    </AppBarButton> 
                    <AppBarButton x:Uid="SaveToPCButton" Label="XX Save to PC" Style="{StaticResource AppBarButtonStyle}" Click="_saveToPCAppBarButton_Click" IsEnabled="{x:Bind IsExportAvailable, Mode=OneWay}">
                        <AppBarButton.Icon>
                            <SymbolIcon Symbol="SaveLocal" Foreground="{ThemeResource AccentFillColorDefaultBrush}"/>
                        </AppBarButton.Icon>
                    </AppBarButton>
                    <AppBarButton x:Uid="AddFromPCButton" Label="XX Add from PC" Style="{StaticResource AppBarButtonStyle}" IsEnabled="{x:Bind IsImportAvailable, Mode=OneWay}">
                        <AppBarButton.Icon>
                            <SymbolIcon Symbol="Upload" Foreground="{ThemeResource AccentFillColorDefaultBrush}"/>
                        </AppBarButton.Icon>
                            <AppBarButton.Flyout>
                            <MenuFlyout>
                                <MenuFlyoutItem x:Uid="AddFromPCAddFilesMenuFlyoutIcon" Text="XX Add Files" Click="_addFileFromPCMenuFlyoutItem_Click">
                                    <MenuFlyoutItem.Icon>
                                        <FontIcon Glyph="&#xE8E5;" Foreground="{ThemeResource AccentFillColorDefaultBrush}"/>
                                    </MenuFlyoutItem.Icon>
                                </MenuFlyoutItem>
                                <MenuFlyoutItem x:Uid="AddFromPCAddFolderMenuFlyoutIcon" Text="XX Add Folder" Click="_addFolderFromPCMenuFlyoutItem_Click">
                                    <MenuFlyoutItem.Icon>
                                        <FontIcon Glyph="&#xE8DA;" Foreground="{ThemeResource AccentFillColorDefaultBrush}"/>
                                    </MenuFlyoutItem.Icon>
                                </MenuFlyoutItem>
                            </MenuFlyout>
                        </AppBarButton.Flyout>
                    </AppBarButton>
                    <AppBarButton x:Uid="CreateFolderButton" Label="XX New Folder" Style="{ThemeResource AppBarButtonStyle}" Click="_createFolderAppBarButton_Click" IsEnabled="{x:Bind IsCreateAvailable, Mode=OneWay}">
                        <AppBarButton.Icon>
                            <SymbolIcon Symbol="NewFolder" Foreground="{ThemeResource AccentFillColorDefaultBrush}"/>
                        </AppBarButton.Icon>
                    </AppBarButton>
                    <AppBarButton x:Uid="RefreshButton" Label="XX Refresh" Style="{ThemeResource AppBarButtonStyle}">
                        <AppBarButton.Icon>
                            <SymbolIcon Symbol="Refresh" Foreground="{ThemeResource AccentFillColorDefaultBrush}"/>
                        </AppBarButton.Icon>
                        <AppBarButton.Flyout>
                            <MenuFlyout>
                                <MenuFlyoutItem x:Uid="RefreshCurrentFolderFlyoutItem" Text="XX Current Folder" Click="_refreshFolderAppBarButton_Click">
                                    <MenuFlyoutItem.Icon>
                                        <FontIcon Glyph="&#xE8B7;"  Foreground="{ThemeResource AccentFillColorDefaultBrush}"/>
                                    </MenuFlyoutItem.Icon>
                                </MenuFlyoutItem>
                                <MenuFlyoutItem x:Uid="RefreshDeviceFlyoutItem" Text="XX Device" Click="_refreshDeviceAppBarButton_Click">
                                    <MenuFlyoutItem.Icon>
                                        <FontIcon Glyph="&#xE8EA;"  Foreground="{ThemeResource AccentFillColorDefaultBrush}" />
                                    </MenuFlyoutItem.Icon>
                                </MenuFlyoutItem>
                            </MenuFlyout>
                        </AppBarButton.Flyout>
                    </AppBarButton>
                    <AppBarButton x:Name="appBarButtonDelete" x:Uid="DeleteSelectionButton" Label="XX Delete Selection" Style="{ThemeResource AppBarButtonStyle}" Click="_deleteSelectionAppBarButton_Click" IsEnabled="{x:Bind IsDeleteAvailable, Mode=OneWay}">
                        <AppBarButton.Icon>
                            <SymbolIcon Symbol="Delete" Foreground="{ThemeResource AccentFillColorDefaultBrush}" />
                        </AppBarButton.Icon>
                    </AppBarButton>
                </CommandBar>
                <TextBlock Text="{x:Bind PageTitle}" Style="{ThemeResource PageHeaderTitleStyle}"/>
            </Grid>
        </Border>
        <SplitView Grid.Row="1" OpenPaneLength="300" Style="{ThemeResource FeatureSplitViewStyle}">
            <SplitView.Pane>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="auto"/>
                    </Grid.ColumnDefinitions>
                    <TreeView x:Name="treeViewFolders"  Margin="0,10,0,0" ItemsSource="{x:Bind Folders, Mode=OneWay}" SelectionMode="Multiple" KeyUp="_treeViewFolders_KeyUp" Tapped="_treeViewFolders_Tapped" RightTapped="_treeViewFolders_RightTapped" DoubleTapped="_treeViewFolders_DoubleTapped" IsDoubleTapEnabled="True" Expanding="_treeViewFolders_Expanding" Loaded="_treeViewFolders_Loaded" CanDragItems="False" CanDrag="False" AllowDrop="True" CanReorderItems="False" DragOver="_treeViewFolders_DragOver">
                        <TreeView.ItemTemplate>
                            <DataTemplate x:DataType="data:DeviceFolder">
                                <TreeViewItem x:Name="treeViewItem" AutomationProperties.Name="{x:Bind Name}"
                                          ItemsSource="{x:Bind Children, Converter={StaticResource DeviceEntriesToSortedDataSourceConverter}, ConverterParameter=ExcludeFiles, Mode=OneWay}" Opacity="{x:Bind Opacity, Mode=OneWay}" AllowDrop="True" DragOver="_treeViewItem_DragOver" Drop="_treeViewItem_Drop">
                                    <TreeViewItem.ContextFlyout>
                                        <MenuFlyout>
                                            <MenuFlyoutItem x:Uid="SaveFolderToPCFlyoutItem" Text="XX Save to PC" Click="_saveFolderMenuFlyoutItem_Click">
                                                <MenuFlyoutItem.Icon>
                                                    <FontIcon Glyph="&#xE78C;" />
                                                </MenuFlyoutItem.Icon>
                                            </MenuFlyoutItem>
                                            <MenuFlyoutSeparator />
                                            <MenuFlyoutItem x:Uid="CreateSubFolderFlyoutItem" Text="XX New Folder" Click="_createSubFolderMenuFlyoutItem_Click">
                                                <MenuFlyoutItem.Icon>
                                                    <FontIcon Glyph="&#xE8F4;" />
                                                </MenuFlyoutItem.Icon>
                                            </MenuFlyoutItem>
                                            <MenuFlyoutItem x:Uid="DeleteFolderFlyoutItem" Text="XX Delete Folder" Click="_deleteFolderMenuFlyoutItem_Click">
                                                <MenuFlyoutItem.Icon>
                                                    <FontIcon Glyph="&#xE74D;" />
                                                </MenuFlyoutItem.Icon>
                                            </MenuFlyoutItem>
                                        </MenuFlyout>
                                    </TreeViewItem.ContextFlyout>
                                    <StackPanel Orientation="Horizontal">
                                        <FontIcon x:Name="treeViewItemIcon" Glyph="{Binding Path=IsExpanded, ElementName=treeViewItem, Converter={StaticResource BooleanToFolderFontIconGlyphConverter}}"
                                              Margin="0,0,10,0" />
                                        <TextBlock Text="{x:Bind Name}" VerticalAlignment="Center" />
                                    </StackPanel>
                                </TreeViewItem>
                            </DataTemplate>
                        </TreeView.ItemTemplate>
                    </TreeView>
                    <controls:ResizeSplitterHandle Grid.RowSpan="2" Grid.Column="1" Margin="0"/>
                </Grid>
            </SplitView.Pane>
            <Border Style="{ThemeResource FeatureContentPageBorder}" Padding="0" AllowDrop="True" DragOver="_gridViewEntries_DragOver" Drop="_gridViewEntries_Drop">
                <Grid x:Name="gridContent">
                    <GridView x:Name="gridViewEntries" ItemsSource="{x:Bind DisplayedEntries, Mode=OneWay}" ItemClick="_gridViewEntries_ItemClick" IsItemClickEnabled="True" RightTapped="_gridViewEntries_RightTapped" PreviewKeyDown="_gridViewEntries_PreviewKeyDown" SelectionMode="Extended" HorizontalContentAlignment="Stretch" Padding="10" Visibility="{x:Bind DisplayedEntries, Converter={StaticResource EnumerableCountToVisibilityConverter}, Mode=OneWay}" SelectionChanged="_gridViewEntries_SelectionChanged" >
                        <GridView.ItemContainerStyle>
                            <Style TargetType="GridViewItem" BasedOn="{StaticResource DefaultGridViewItemStyle}">
                                <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                            </Style>
                        </GridView.ItemContainerStyle>
                        <GridView.ContextFlyout>
                            <MenuFlyout>
                                <MenuFlyoutItem x:Uid="SaveToPCFlyoutItem" Text="XX Save to PC" Click="_saveEntryMenuFlyoutItem_Click">
                                    <MenuFlyoutItem.Icon>
                                        <FontIcon Glyph="&#xE78C;" />
                                    </MenuFlyoutItem.Icon>
                                </MenuFlyoutItem>
                                <MenuFlyoutSeparator />
                                <MenuFlyoutSubItem x:Uid="AddFromPCFlyoutItem" Text="XX Add from PC">
                                    <MenuFlyoutSubItem.Icon>
                                        <FontIcon Glyph="&#xE898;" />
                                    </MenuFlyoutSubItem.Icon>
                                    <MenuFlyoutItem x:Uid="AddFromPCAddFilesFlyoutItem" Text="XX Add Files" Click="_addFileFromPCMenuFlyoutItem_Click">
                                        <MenuFlyoutItem.Icon>
                                            <FontIcon Glyph="&#xE8E5;" />
                                        </MenuFlyoutItem.Icon>
                                    </MenuFlyoutItem>
                                    <MenuFlyoutItem x:Uid="AddFromPCAddFolderFlyoutItem" Text="XX Add Folder" Click="_addFolderFromPCMenuFlyoutItem_Click">
                                        <MenuFlyoutItem.Icon>
                                            <FontIcon Glyph="&#xE8DA;" />
                                        </MenuFlyoutItem.Icon>
                                    </MenuFlyoutItem>
                                </MenuFlyoutSubItem>
                                <MenuFlyoutItem x:Uid="CreateFolderFlyoutItem" Text="XX New Folder" Click="_createFolderMenuFlyoutItem_Click">
                                    <MenuFlyoutItem.Icon>
                                        <FontIcon Glyph="&#xE8F4;" />
                                    </MenuFlyoutItem.Icon>
                                </MenuFlyoutItem>
                                <MenuFlyoutSeparator />
                                <MenuFlyoutItem x:Uid="DeleteEntryFlyoutItem" Text="XX Delete" Click="_deleteEntryMenuFlyoutItem_Click">
                                    <MenuFlyoutItem.Icon>
                                        <FontIcon Glyph="&#xE74D;" />
                                    </MenuFlyoutItem.Icon>
                                </MenuFlyoutItem>
                            </MenuFlyout>
                        </GridView.ContextFlyout>
                    </GridView>
                    <Grid Visibility="{x:Bind gridViewEntries.Visibility, Converter={StaticResource VisibilityInverter}, Mode=OneWay}">
                        <StackPanel VerticalAlignment="Center" Margin="20,0" Spacing="5">
                            <TextBlock Text="{x:Bind DisplayedFolder.Name, FallbackValue='', TargetNullValue='', Mode=OneWay}" Style="{ThemeResource BodyStrongTextBlockStyle}" TextAlignment="Center" Opacity="0.7" TextWrapping="Wrap" />
                            <TextBlock x:Uid="TextBlockFolderEmpty" Text="XX This folder is empty." Style="{ThemeResource CaptionTextBlockStyle}" TextAlignment="Center" TextWrapping="Wrap" />
                        </StackPanel>
                    </Grid>
                </Grid>
            </Border>
        </SplitView>
        <ContentDialog x:Name="dialogCreateFolder" x:Uid="CreateFolderDialog" PrimaryButtonText="XX Create" IsPrimaryButtonEnabled="True" CloseButtonText="XX Cancel" Title="XX New Folder Name:" DefaultButton="Primary">
            <Grid Background="Transparent">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <TextBox x:Name="textBoxNewFolderName" x:Uid="NewFolderNameTextBox" PlaceholderText="XX New Folder" VerticalContentAlignment="Center" VerticalAlignment="Center" TextChanged="_textBoxNewFolder_TextChanged" />
                <TextBlock x:Name="textBlockInvalidNewFolderName" x:Uid="InvalidNewFolderNameTextBlock" Grid.Row="1" Text="XX The entered name is invalid." Foreground="Red" FontWeight="SemiBold" TextWrapping="Wrap" Margin="0,8,0,0" Visibility="Collapsed" />
            </Grid>
        </ContentDialog>
        <ContentDialog x:Name="dialogConfirmDelete" x:Uid="ConfirmDeleteDialog" PrimaryButtonText="XX Delete" IsPrimaryButtonEnabled="True" CloseButtonText="XX Cancel" Title="XX Once deleted, this action cannot be undone!" DefaultButton="None">
            <Grid Background="Transparent">
                <TextBlock x:Uid="DeletionWarningTextBlock" Text="XX Warning: Deleting system files or folders can cause irreversible issues with your device." Foreground="Red" TextWrapping="Wrap" />
            </Grid>
        </ContentDialog>
        <ContentDialog x:Name="dialogConfirmOverwrite" x:Uid="ConfirmOverwriteDialog" PrimaryButtonText="XX Overwrite" IsPrimaryButtonEnabled="True" CloseButtonText="XX Cancel" Title="XX Overwrite existing files?" DefaultButton="None">
            <Grid Background="Transparent">
                <TextBlock x:Uid="OverwriteWarningTextBlock" Text="XX Warning: One or more files already exist with the same name. It will not be possible to recover these if overwritten." Foreground="Red" TextWrapping="Wrap" />
            </Grid>
        </ContentDialog>
        <dialogs:RequestFullFilesPermissionsContentDialog x:Name="dialogFullFilesPermissions" Loaded="_dialogFullFilesPermissions_Loaded" />
        <InfoBar x:Uid="InfoBarFilesRestricted" x:Name="infoBarFilesRestricted" Grid.Row="1" IsOpen="False" VerticalAlignment="Bottom" Title="XX Only showing media files." Severity="Warning" HorizontalAlignment="Right" Margin="12,12,12,12" >
            <InfoBar.ActionButton>
                <HyperlinkButton Click="_infoBarFilesRestricted_Click">
                    <TextBlock x:Uid="InfoBarFilesRestrictedTextBlock" Text="XX Change permissions to see all file types." />
                </HyperlinkButton>
            </InfoBar.ActionButton>
        </InfoBar>
        <InfoBar x:Uid="InfoBarUsingAppStorage" x:Name="infoBarUsingAppStorage" Grid.Row="1" IsOpen="False" VerticalAlignment="Bottom" Title="XX Using Transfer Companion Storage" Severity="Warning" HorizontalAlignment="Right" Margin="12,12,12,12" >
            <StackPanel Padding="0,0,0,16">
                <TextBlock x:Uid="TextBlockUsingAppStorageLineOne" Text="XX Droid Transfer was unable to access folders from your device and is using Transfer Companion app storage." TextWrapping="WrapWholeWords" />
                <TextBlock x:Uid="TextBlockUsingAppStorageLineTwo" Text="XX Deleting or clearing the Transfer Companion app's data will delete these files from your device." TextWrapping="WrapWholeWords" FontWeight="SemiBold" Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}" />
            </StackPanel>
            
        </InfoBar>
    </Grid>
</featurebase:FeaturePage>
