Files

89 lines
3.1 KiB
XML

<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Custom="using:Microsoft.Xaml.Interactivity"
xmlns:Custom1="using:Microsoft.Xaml.Interactions.Core"
xmlns:model="using:FileManager_UWP.Model"
x:Class="FileManager_UWP.View.FileListView"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Button
Grid.Row="0"
Grid.Column="1"
Command="{Binding RefreshCommand}"
Content="刷新文件列表"
FontSize="20"/>
<TextBox
Grid.Row="0"
Grid.Column="0"
Width="Auto"
Text="{Binding Path}"
/>
<ListView
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
ItemsSource="{Binding DisplayFileFolderItems}"
CanDragItems="False"
CanReorderItems="True"
AllowDrop="False"
SelectionMode="Single"
SelectedItem="{Binding ListSelectedItem, Mode=TwoWay}"
IsDoubleTapEnabled="True"
IsTapEnabled="True"
>
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel
Orientation="Horizontal"
Height="44"
Padding="12"
>
<Image Source="{Binding Icon}"
Height="16"
Width="16"
VerticalAlignment="Center"/>
<TextBlock
Text="{Binding Name}"
VerticalAlignment="Center"
Style="{ThemeResource BaseTextBlockStyle}"
Foreground="{ThemeResource SystemControlPageTextBaseHighBrush}"
Margin="12,0,0,0"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
<Custom:Interaction.Behaviors>
<Custom1:EventTriggerBehavior EventName="DoubleTapped">
<Custom1:InvokeCommandAction Command="{Binding DoubleTappedCommand}"/>
</Custom1:EventTriggerBehavior>
</Custom:Interaction.Behaviors>
</ListView>
<TextBlock
Text="{Binding DebugText}"
Grid.Row="2"
Grid.Column="0"
/>
</Grid>
</Page>