|
13 | 13 | xmlns:navigation="using:Files.Navigation"
|
14 | 14 | Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
15 | 15 | Name="PhotoAlbumViewer"
|
16 |
| - PointerReleased="PhotoAlbumViewer_PointerReleased"> |
| 16 | + PointerReleased="PhotoAlbumViewer_PointerReleased" PointerPressed="PhotoAlbumViewer_PointerPressed"> |
17 | 17 |
|
18 | 18 | <Page.Resources>
|
19 | 19 | <Style x:Key="MenuFlyoutFluentThemeResources" TargetType="MenuFlyoutPresenter">
|
|
372 | 372 | </Setter.Value>
|
373 | 373 | </Setter>
|
374 | 374 | </Style>
|
| 375 | + <ItemsPanelTemplate x:Key="GridViewItemsPanel1"> |
| 376 | + <ItemsWrapGrid Orientation="Horizontal"/> |
| 377 | + </ItemsPanelTemplate> |
375 | 378 | </Page.Resources>
|
376 | 379 |
|
377 | 380 | <Grid Tag="{x:Bind Tag, Mode=OneWay}" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Padding="0,0,0,0" VerticalAlignment="Stretch">
|
|
400 | 403 | <ProgressBar Name="ProgBar" Height="10" VerticalAlignment="Top" IsIndeterminate="True"/>
|
401 | 404 | <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"/>
|
402 | 405 |
|
403 |
| - <controls:AdaptiveGridView RightTapped="FileList_RightTapped" StretchContentForSingleRow="False" DesiredWidth="150" VerticalContentAlignment="Stretch" ItemHeight="150" 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" > |
404 |
| - <controls:AdaptiveGridView.ItemTemplate> |
405 |
| - <DataTemplate> |
406 |
| - <StackPanel Tag="{Binding RowIndex}" RightTapped="StackPanel_RightTapped" Orientation="Vertical" Padding="0" ToolTipService.ToolTip="{Binding FileName}" Background="Transparent" IsRightTapEnabled="True" Margin="0, 0, 0, 0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
407 |
| - <StackPanel.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> |
| 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> |
442 | 442 |
|
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> |
| 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> |
450 | 450 |
|
451 |
| - </MenuFlyout> |
452 |
| - </StackPanel.ContextFlyout> |
| 451 | + </MenuFlyout> |
| 452 | + </GridView.ContextFlyout> |
| 453 | + <GridView.ItemTemplate> |
| 454 | + <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"> |
453 | 456 | <Grid Width="150" Height="100">
|
454 |
| - <Grid Padding="12" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="Picture" Visibility="{Binding FileIconVis}"> |
455 |
| - <Image Stretch="Uniform" Source="{Binding FileImg}"/> |
| 457 | + <Grid Padding="12" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="Picture" Visibility="{x:Bind FileIconVis}"> |
| 458 | + <Image Stretch="Uniform" Source="{x:Bind FileImg}"/> |
456 | 459 | </Grid>
|
457 |
| - <Grid Name="Album" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="{Binding FolderImg}"> |
| 460 | + <Grid Name="Album" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="{x:Bind FolderImg}"> |
458 | 461 | <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
459 | 462 | <FontIcon FontSize="72" Glyph="" FontFamily="Segoe MDL2 Assets" Foreground="#ffe793"/>
|
460 | 463 | </Grid>
|
461 | 464 | </Grid>
|
462 |
| - <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="{Binding EmptyImgVis}"> |
| 465 | + <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="{x:Bind EmptyImgVis}"> |
463 | 466 | <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
464 | 467 | <FontIcon FontSize="72" Glyph="" FontFamily="Segoe MDL2 Assets"/>
|
465 | 468 | </Grid>
|
466 | 469 | </Grid>
|
467 | 470 | </Grid>
|
468 |
| - <TextBlock MaxWidth="150" HorizontalTextAlignment="Center" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Text="{Binding FileName}" TextWrapping="Wrap"/> |
| 471 | + <TextBlock MaxWidth="150" HorizontalTextAlignment="Center" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Text="{x:Bind FileName}" TextWrapping="Wrap"/> |
469 | 472 | </StackPanel>
|
470 | 473 |
|
471 | 474 | </DataTemplate>
|
472 |
| - </controls:AdaptiveGridView.ItemTemplate> |
473 |
| - </controls:AdaptiveGridView> |
| 475 | + </GridView.ItemTemplate> |
| 476 | + </GridView> |
474 | 477 | </Grid>
|
475 | 478 | </Page>
|
0 commit comments