DocItemControl.xaml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <UserControl
  2. x:Class="PDF_Master.Views.HomePanel.RecentFiles.DocItemControl"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Master.Views.HomePanel"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. d:DesignHeight="450"
  9. d:DesignWidth="800"
  10. mc:Ignorable="d">
  11. <Grid
  12. DataContext="{Binding}"
  13. DataContextChanged="Grid_DataContextChanged"
  14. Loaded="Grid_Loaded"
  15. ToolTip="{Binding FilePath}">
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="auto" />
  18. <RowDefinition Height="52" />
  19. </Grid.RowDefinitions>
  20. <Grid Margin="51,8">
  21. <Border
  22. HorizontalAlignment="Center"
  23. VerticalAlignment="Center"
  24. BorderBrush="{StaticResource color.sys.layout.divider}"
  25. BorderThickness="1"
  26. CornerRadius="{StaticResource border-radius.8}">
  27. <Grid>
  28. <Border
  29. Name="BorderImage"
  30. Background="White"
  31. CornerRadius="{StaticResource border-radius.8}" />
  32. <Image
  33. Name="CoverImage"
  34. MaxHeight="164"
  35. RenderOptions.BitmapScalingMode="HighQuality"
  36. UseLayoutRounding="True">
  37. <Image.OpacityMask>
  38. <VisualBrush Visual="{Binding ElementName=BorderImage}" />
  39. </Image.OpacityMask>
  40. </Image>
  41. </Grid>
  42. </Border>
  43. </Grid>
  44. <StackPanel
  45. Grid.Row="1"
  46. Margin="0,0,0,8"
  47. HorizontalAlignment="Center"
  48. VerticalAlignment="Center"
  49. Orientation="Horizontal">
  50. <Rectangle
  51. Name="RecNewMark"
  52. Width="4"
  53. Height="4"
  54. Margin="4,0"
  55. Fill="{StaticResource color.btn.cta.bg.norm}"
  56. RadiusX="4"
  57. RadiusY="4"
  58. Visibility="Collapsed" />
  59. <TextBlock
  60. Grid.Row="1"
  61. MaxWidth="210"
  62. MaxHeight="44"
  63. HorizontalAlignment="Center"
  64. VerticalAlignment="Top"
  65. FontSize="14"
  66. Text="{Binding FileName}"
  67. TextAlignment="Center"
  68. TextTrimming="CharacterEllipsis"
  69. TextWrapping="Wrap"
  70. ToolTip="{Binding FileName}" />
  71. </StackPanel>
  72. </Grid>
  73. </UserControl>