|
9 | 9 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
10 | 10 | xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" |
11 | 11 | xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations" |
| 12 | + xmlns:Interactivity="using:Microsoft.Xaml.Interactivity" |
| 13 | + xmlns:Core="using:Microsoft.Xaml.Interactions.Core" |
12 | 14 | mc:Ignorable="d" |
13 | 15 | xmlns:navigation="using:Files.Navigation" |
14 | 16 | Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" |
|
403 | 405 | <ProgressBar Name="ProgBar" Height="10" VerticalAlignment="Top" IsIndeterminate="True"/> |
404 | 406 | <TextBlock Visibility="{x:Bind TextState.isVisible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Name="EmptyText" HorizontalAlignment="Center" Text="This folder is empty." TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,125,0,0" Grid.Row="3" Canvas.ZIndex="0"/> |
405 | 407 |
|
406 | | - <GridView ContextRequested="FileList_ContextRequested" Background="Transparent" ItemsSource="{x:Bind instanceViewModel.FilesAndFolders}" RightTapped="FileList_RightTapped" VerticalContentAlignment="Stretch" animations:ReorderGridAnimation.Duration="300" ShowsScrollingPlaceholders="True" Margin="24,24,24,0" Grid.Row="3" SelectionMode="Extended" IsRightTapEnabled="True" IsDoubleTapEnabled="True" Name="FileList" Padding="0, 0, 0, 0" > |
407 | | - <GridView.ContextFlyout> |
408 | | - <MenuFlyout x:Name="RightClickContextMenu" MenuFlyoutPresenterStyle="{StaticResource MenuFlyoutFluentThemeResources}"> |
409 | | - <MenuFlyout.Items> |
410 | | - <MenuFlyoutItem Click="OpenItem_Click" Text="Open With..." Name="OpenItem"> |
411 | | - <MenuFlyoutItem.Icon> |
412 | | - <FontIcon Glyph=""/> |
413 | | - </MenuFlyoutItem.Icon> |
414 | | - </MenuFlyoutItem> |
415 | | - <MenuFlyoutItem Click="ShareItem_Click" Text="Share" Name="ShareItem"> |
416 | | - <MenuFlyoutItem.Icon> |
417 | | - <FontIcon Glyph=""/> |
418 | | - </MenuFlyoutItem.Icon> |
419 | | - </MenuFlyoutItem> |
420 | | - <MenuFlyoutSeparator/> |
421 | | - <MenuFlyoutItem Click="DeleteItem_Click" Text="Delete" Name="DeleteItem" > |
422 | | - <MenuFlyoutItem.Icon> |
423 | | - <FontIcon Glyph=""/> |
424 | | - </MenuFlyoutItem.Icon> |
425 | | - </MenuFlyoutItem> |
426 | | - <MenuFlyoutItem Click="RenameItem_Click" Text="Rename" Name="RenameItem" > |
427 | | - <MenuFlyoutItem.Icon> |
428 | | - <FontIcon Glyph=""/> |
429 | | - </MenuFlyoutItem.Icon> |
430 | | - </MenuFlyoutItem> |
431 | | - <MenuFlyoutSeparator/> |
432 | | - <MenuFlyoutItem Click="CutItem_Click" Text="Cut" Name="CutItem" > |
433 | | - <MenuFlyoutItem.Icon> |
434 | | - <FontIcon Glyph=""/> |
435 | | - </MenuFlyoutItem.Icon> |
436 | | - </MenuFlyoutItem> |
437 | | - <MenuFlyoutItem Click="CopyItem_Click" Text="Copy" Name="CopyItem" > |
438 | | - <MenuFlyoutItem.Icon> |
439 | | - <FontIcon Glyph=""/> |
440 | | - </MenuFlyoutItem.Icon> |
441 | | - </MenuFlyoutItem> |
| 408 | + <GridView Name="FileList" Margin="24,24,24,0" SelectionMode="Extended" ItemsSource="{x:Bind instanceViewModel.FilesAndFolders}" VerticalContentAlignment="Stretch" animations:ReorderGridAnimation.Duration="300"> |
| 409 | + <GridView.ItemContainerStyle> |
| 410 | + <Style TargetType="GridViewItem"> |
| 411 | + <Setter Property="ContextFlyout"> |
| 412 | + <Setter.Value> |
| 413 | + <MenuFlyout x:Name="RightClickContextMenu" MenuFlyoutPresenterStyle="{StaticResource MenuFlyoutFluentThemeResources}"> |
| 414 | + <MenuFlyout.Items> |
| 415 | + <MenuFlyoutItem Click="OpenItem_Click" Text="Open With..." Name="OpenItem"> |
| 416 | + <MenuFlyoutItem.Icon> |
| 417 | + <FontIcon Glyph=""/> |
| 418 | + </MenuFlyoutItem.Icon> |
| 419 | + </MenuFlyoutItem> |
| 420 | + <MenuFlyoutItem Click="ShareItem_Click" Text="Share" Name="ShareItem"> |
| 421 | + <MenuFlyoutItem.Icon> |
| 422 | + <FontIcon Glyph=""/> |
| 423 | + </MenuFlyoutItem.Icon> |
| 424 | + </MenuFlyoutItem> |
| 425 | + <MenuFlyoutSeparator/> |
| 426 | + <MenuFlyoutItem Click="DeleteItem_Click" Text="Delete" Name="DeleteItem" > |
| 427 | + <MenuFlyoutItem.Icon> |
| 428 | + <FontIcon Glyph=""/> |
| 429 | + </MenuFlyoutItem.Icon> |
| 430 | + </MenuFlyoutItem> |
| 431 | + <MenuFlyoutItem Click="RenameItem_Click" Text="Rename" Name="RenameItem" > |
| 432 | + <MenuFlyoutItem.Icon> |
| 433 | + <FontIcon Glyph=""/> |
| 434 | + </MenuFlyoutItem.Icon> |
| 435 | + </MenuFlyoutItem> |
| 436 | + <MenuFlyoutSeparator/> |
| 437 | + <MenuFlyoutItem Click="CutItem_Click" Text="Cut" Name="CutItem" > |
| 438 | + <MenuFlyoutItem.Icon> |
| 439 | + <FontIcon Glyph=""/> |
| 440 | + </MenuFlyoutItem.Icon> |
| 441 | + </MenuFlyoutItem> |
| 442 | + <MenuFlyoutItem Click="CopyItem_Click" Text="Copy" Name="CopyItem" > |
| 443 | + <MenuFlyoutItem.Icon> |
| 444 | + <FontIcon Glyph=""/> |
| 445 | + </MenuFlyoutItem.Icon> |
| 446 | + </MenuFlyoutItem> |
442 | 447 |
|
443 | | - <MenuFlyoutSeparator/> |
444 | | - <MenuFlyoutItem Click="PropertiesItem_Click" Text="Properties" Name="PropertiesItem"> |
445 | | - <MenuFlyoutItem.Icon> |
446 | | - <FontIcon Glyph=""/> |
447 | | - </MenuFlyoutItem.Icon> |
448 | | - </MenuFlyoutItem> |
449 | | - </MenuFlyout.Items> |
| 448 | + <MenuFlyoutSeparator/> |
| 449 | + <MenuFlyoutItem Click="PropertiesItem_Click" Text="Properties" Name="PropertiesItem"> |
| 450 | + <MenuFlyoutItem.Icon> |
| 451 | + <FontIcon Glyph=""/> |
| 452 | + </MenuFlyoutItem.Icon> |
| 453 | + </MenuFlyoutItem> |
| 454 | + </MenuFlyout.Items> |
450 | 455 |
|
451 | | - </MenuFlyout> |
452 | | - </GridView.ContextFlyout> |
| 456 | + </MenuFlyout> |
| 457 | + </Setter.Value> |
| 458 | + </Setter> |
| 459 | + </Style> |
| 460 | + </GridView.ItemContainerStyle> |
453 | 461 | <GridView.ItemTemplate> |
454 | 462 | <DataTemplate x:DataType="local2:ListedItem"> |
455 | | - <StackPanel Width="150" Height="150" Tag="{x:Bind RowIndex}" Orientation="Vertical" Padding="0" ToolTipService.ToolTip="{Binding FileName}" Background="Transparent" Margin="0, 0, 0, 0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
| 463 | + <StackPanel IsRightTapEnabled="True" RightTapped="StackPanel_RightTapped" Width="150" Height="150" Tag="{x:Bind RowIndex}" Orientation="Vertical" Padding="0" ToolTipService.ToolTip="{Binding FileName}" Background="Transparent" Margin="0, 0, 0, 0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
456 | 464 | <Grid Width="150" Height="100"> |
457 | 465 | <Grid Padding="12" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="Picture" Visibility="{x:Bind FileIconVis}"> |
458 | 466 | <Image Stretch="Uniform" Source="{x:Bind FileImg}"/> |
|
0 commit comments