|
7 | 7 | xmlns:controls="using:Files.App.Controls" |
8 | 8 | xmlns:converters="using:Files.App.Converters" |
9 | 9 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 10 | + xmlns:datamodels="using:Files.App.Data.Models" |
10 | 11 | xmlns:filesystem="using:Files.App.Utils" |
11 | 12 | xmlns:helpers="using:Files.App.Helpers" |
12 | 13 | xmlns:i="using:Microsoft.Xaml.Interactivity" |
|
439 | 440 | VerticalAlignment="Stretch" |
440 | 441 | BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
441 | 442 | BorderThickness="1" |
442 | | - ColumnSpacing="4" |
443 | 443 | CornerRadius="8" |
444 | 444 | IsRightTapEnabled="True" |
445 | 445 | Loaded="Grid_Loaded" |
446 | 446 | PointerEntered="Grid_PointerEntered"> |
447 | 447 | <Grid.ColumnDefinitions> |
448 | 448 | <ColumnDefinition Width="Auto" /> |
449 | | - <ColumnDefinition Width="68" /> |
450 | 449 | <ColumnDefinition Width="*" /> |
451 | 450 | </Grid.ColumnDefinitions> |
452 | 451 |
|
453 | | - <StackPanel |
454 | | - Width="20" |
455 | | - Margin="8,4,0,4" |
456 | | - HorizontalAlignment="Center" |
457 | | - VerticalAlignment="Center" |
458 | | - Orientation="Vertical"> |
459 | | - <Ellipse |
460 | | - Width="12" |
461 | | - Height="12" |
462 | | - Margin="0,4,0,4" |
463 | | - x:Phase="2" |
464 | | - Fill="{x:Bind FileTagsUI[0].Color, Mode=OneWay, Converter={StaticResource StringToBrushConverter}}" |
465 | | - ToolTipService.ToolTip="{x:Bind FileTagsUI[0].Name, Mode=OneWay}" |
466 | | - Visibility="{x:Bind FileTagsUI, Converter={StaticResource EmptyObjectToObjectConverter}, Mode=OneWay}" /> |
467 | | - |
468 | | - <Border |
469 | | - x:Name="CloudDriveSyncStatusGlyph" |
470 | | - x:Phase="2" |
471 | | - Background="Transparent" |
472 | | - ToolTipService.ToolTip="{x:Bind SyncStatusUI.SyncStatusString, Mode=OneWay}" |
473 | | - Visibility="{Binding InstanceViewModel.IsPageTypeCloudDrive, ElementName=PageRoot, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"> |
474 | | - <controls:ThemedIcon |
475 | | - Width="16" |
476 | | - Height="16" |
477 | | - Style="{x:Bind ((cloud:CloudDriveSyncStatusUI)SyncStatusUI).ThemedIconStyle, Mode=OneWay}" /> |
478 | | - </Border> |
479 | | - </StackPanel> |
480 | | - |
481 | 452 | <CheckBox |
482 | 453 | x:Name="SelectionCheckbox" |
483 | | - Grid.ColumnSpan="2" |
484 | 454 | Width="32" |
485 | 455 | MinWidth="0" |
486 | 456 | MinHeight="0" |
|
495 | 465 | Unchecked="ItemSelected_Unchecked" /> |
496 | 466 |
|
497 | 467 | <Grid |
498 | | - Grid.Column="0" |
499 | | - Grid.ColumnSpan="2" |
500 | 468 | Width="{Binding ElementName=PageRoot, Path=CardsViewIconBoxWidth, Mode=OneWay}" |
501 | 469 | Height="{Binding ElementName=PageRoot, Path=CardsViewIconBoxHeight, Mode=OneWay}" |
502 | 470 | Background="{ThemeResource SystemFillColorNeutralBackgroundBrush}" |
|
529 | 497 | Width="32" |
530 | 498 | Height="32" |
531 | 499 | Margin="2" |
532 | | - HorizontalAlignment="Left" |
533 | | - VerticalAlignment="Bottom" |
| 500 | + HorizontalAlignment="Right" |
| 501 | + VerticalAlignment="Top" |
534 | 502 | x:Load="True" |
535 | 503 | x:Phase="1" |
536 | 504 | Source="{x:Bind IconOverlay, Mode=OneWay}" |
|
540 | 508 | x:Name="ShortcutGlyphElement" |
541 | 509 | Width="16" |
542 | 510 | Height="16" |
543 | | - HorizontalAlignment="Left" |
544 | | - VerticalAlignment="Bottom" |
| 511 | + HorizontalAlignment="Right" |
| 512 | + VerticalAlignment="Top" |
545 | 513 | x:Load="{x:Bind IsShortcut}" |
546 | 514 | x:Phase="1"> |
547 | 515 | <controls:ThemedIcon |
|
555 | 523 | Width="16" |
556 | 524 | Height="16" |
557 | 525 | HorizontalAlignment="Right" |
558 | | - VerticalAlignment="Bottom" |
| 526 | + VerticalAlignment="Top" |
559 | 527 | x:Load="{x:Bind IsElevationRequired}" |
560 | 528 | x:Phase="1" |
561 | 529 | Source="{x:Bind ShieldIcon, Mode=OneWay}" |
562 | 530 | Stretch="Uniform" /> |
563 | 531 | </Grid> |
564 | 532 |
|
565 | 533 | <Grid |
566 | | - Grid.Column="2" |
567 | | - Height="60" |
568 | | - Margin="0,4,8,4" |
| 534 | + Grid.Column="1" |
| 535 | + Padding="12,4,12,4" |
569 | 536 | RowSpacing="4"> |
570 | 537 | <Grid.RowDefinitions> |
571 | 538 | <RowDefinition Height="Auto" /> |
572 | 539 | <RowDefinition Height="Auto" /> |
| 540 | + <RowDefinition Height="*" /> |
| 541 | + <RowDefinition Height="Auto" /> |
573 | 542 | <RowDefinition Height="Auto" /> |
574 | 543 | </Grid.RowDefinitions> |
575 | 544 |
|
|
579 | 548 | HorizontalAlignment="Left" |
580 | 549 | MaxLines="2" |
581 | 550 | Opacity="{x:Bind Opacity, Mode=OneWay}" |
| 551 | + Style="{ThemeResource BodyStrongTextBlockStyle}" |
582 | 552 | Text="{x:Bind Name, Mode=OneWay}" |
583 | 553 | TextTrimming="CharacterEllipsis" |
584 | 554 | TextWrapping="Wrap" /> |
585 | 555 |
|
586 | 556 | <TextBox |
587 | 557 | x:Name="TileViewTextBoxItemName" |
588 | 558 | Grid.Row="0" |
589 | | - Grid.RowSpan="3" |
590 | | - MaxHeight="60" |
| 559 | + Grid.RowSpan="5" |
591 | 560 | HorizontalAlignment="Stretch" |
592 | 561 | BeforeTextChanging="ItemNameTextBox_BeforeTextChanging" |
593 | 562 | Canvas.ZIndex="1" |
|
602 | 571 | <TextBlock |
603 | 572 | Grid.Row="1" |
604 | 573 | HorizontalAlignment="Left" |
605 | | - FontSize="12px" |
606 | | - Opacity="0.6" |
| 574 | + Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
| 575 | + Style="{ThemeResource CaptionTextBlockStyle}" |
607 | 576 | Text="{x:Bind ItemType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
608 | 577 | TextTrimming="CharacterEllipsis" |
609 | 578 | TextWrapping="NoWrap" /> |
610 | 579 |
|
611 | 580 | <TextBlock |
612 | | - Grid.Row="2" |
| 581 | + Grid.Row="3" |
613 | 582 | HorizontalAlignment="Left" |
614 | | - FontSize="12px" |
615 | | - Opacity="0.6" |
| 583 | + Foreground="{ThemeResource TextFillColorSecondaryBrush}" |
| 584 | + Style="{ThemeResource CaptionTextBlockStyle}" |
616 | 585 | Text="{x:Bind FileSize, Mode=OneWay}" |
617 | 586 | TextTrimming="CharacterEllipsis" |
618 | 587 | TextWrapping="NoWrap" /> |
619 | 588 |
|
| 589 | + <Grid Grid.Row="4" Padding="0,0,0,4"> |
| 590 | + <ItemsRepeater |
| 591 | + x:Name="TagsRepeater" |
| 592 | + HorizontalAlignment="Left" |
| 593 | + VerticalAlignment="Center" |
| 594 | + x:Load="{x:Bind HasTags, Mode=OneWay, FallbackValue=False}" |
| 595 | + ItemsSource="{x:Bind FileTagsUI, Mode=OneWay}" |
| 596 | + Visibility="{x:Bind FileTagsUI, Converter={StaticResource EmptyObjectToObjectConverter}, Mode=OneWay}"> |
| 597 | + <ItemsRepeater.Layout> |
| 598 | + <StackLayout Orientation="Horizontal" Spacing="-8" /> |
| 599 | + </ItemsRepeater.Layout> |
| 600 | + <ItemsRepeater.ItemTemplate> |
| 601 | + <DataTemplate x:DataType="datamodels:TagViewModel"> |
| 602 | + <Border |
| 603 | + x:Name="Tag" |
| 604 | + x:Phase="2" |
| 605 | + ToolTipService.ToolTip="{x:Bind Name, Mode=OneWay}"> |
| 606 | + <controls:ThemedIcon |
| 607 | + Width="16" |
| 608 | + Height="16" |
| 609 | + VerticalAlignment="Center" |
| 610 | + IconColorType="Custom" |
| 611 | + IsFilled="True" |
| 612 | + Style="{StaticResource App.ThemedIcons.Tag}" |
| 613 | + Color="{x:Bind Color, Mode=OneWay, Converter={StaticResource StringToBrushConverter}}" /> |
| 614 | + </Border> |
| 615 | + </DataTemplate> |
| 616 | + </ItemsRepeater.ItemTemplate> |
| 617 | + </ItemsRepeater> |
| 618 | + |
| 619 | + <Border |
| 620 | + x:Name="CloudDriveSyncStatusGlyph" |
| 621 | + HorizontalAlignment="Right" |
| 622 | + VerticalAlignment="Center" |
| 623 | + x:Phase="2" |
| 624 | + Background="Transparent" |
| 625 | + ToolTipService.ToolTip="{x:Bind SyncStatusUI.SyncStatusString, Mode=OneWay}" |
| 626 | + Visibility="{Binding InstanceViewModel.IsPageTypeCloudDrive, ElementName=PageRoot, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}"> |
| 627 | + <controls:ThemedIcon |
| 628 | + Width="16" |
| 629 | + Height="16" |
| 630 | + Style="{x:Bind ((cloud:CloudDriveSyncStatusUI)SyncStatusUI).ThemedIconStyle, Mode=OneWay}" /> |
| 631 | + </Border> |
| 632 | + </Grid> |
| 633 | + |
620 | 634 | </Grid> |
621 | 635 |
|
622 | 636 | <VisualStateManager.VisualStateGroups> |
|
0 commit comments