Vibenutý 😔
This commit is contained in:
1 parent
d06a9f332b
commit
8cc27e6b8e
10 files changed
+295
-12
No files matched your search
@@ -7,4 +7,67 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:models="using:winui_learning_3.Models"
|
||||
mc:Ignorable="d">
|
||||
</Page>
|
||||
|
||||
<Page.Resources>
|
||||
<!-- Tree node: a folder -->
|
||||
<DataTemplate x:Key="FolderNodeTemplate" x:DataType="models:FolderContentDto">
|
||||
<TreeViewItem ItemsSource="{x:Bind Children}"
|
||||
Content="{x:Bind Name}"
|
||||
HasUnrealizedChildren="True" />
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Right side: a file row -->
|
||||
<DataTemplate x:Key="FileTemplate" x:DataType="models:FileDto">
|
||||
<Grid Padding="0,10" ColumnSpacing="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<FontIcon Glyph="" FontSize="16" />
|
||||
<TextBlock Grid.Column="1" Text="{x:Bind Name}"
|
||||
TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="2" Text="{x:Bind Extension}"
|
||||
Opacity="0.6" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid ColumnSpacing="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="280" MinWidth="160" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- LEFT: drives + folders -->
|
||||
<Border BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}"
|
||||
BorderThickness="0,0,1,0">
|
||||
<TreeView x:Name="FolderTree"
|
||||
ItemTemplate="{StaticResource FolderNodeTemplate}"
|
||||
SelectionMode="Single"
|
||||
Expanding="FolderTree_Expanding"
|
||||
ItemInvoked="FolderTree_ItemInvoked" />
|
||||
</Border>
|
||||
|
||||
<!-- RIGHT: path bar + content -->
|
||||
<Grid Grid.Column="1" RowSpacing="8" Padding="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<AutoSuggestBox x:Name="PathBox"
|
||||
PlaceholderText="Type a path, e.g. C:\Users"
|
||||
QueryIcon="Forward"
|
||||
GotFocus="PathBox_GotFocus"
|
||||
TextChanged="PathBox_TextChanged"
|
||||
SuggestionChosen="PathBox_SuggestionChosen"
|
||||
QuerySubmitted="PathBox_QuerySubmitted" />
|
||||
|
||||
<ListView x:Name="FileList" Grid.Row="1"
|
||||
ItemTemplate="{StaticResource FileTemplate}"
|
||||
SelectionMode="Single" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
Reference in new issue
Block a user