DocItemControl.xaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <UserControl
  2. x:Class="PDF_Office.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_Office.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. Width="226"
  13. Height="248"
  14. DataContext="{Binding}"
  15. Loaded="Grid_Loaded"
  16. ToolTip="{Binding FilePath}">
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="auto" />
  19. <RowDefinition />
  20. </Grid.RowDefinitions>
  21. <Grid Height="165" Margin="51,16">
  22. <Border
  23. HorizontalAlignment="Center"
  24. VerticalAlignment="Center"
  25. BorderBrush="{StaticResource color.sys.layout.divider}"
  26. BorderThickness="1"
  27. CornerRadius="{StaticResource border-radius.8}">
  28. <Grid>
  29. <Border
  30. Name="BorderImage"
  31. Background="White"
  32. CornerRadius="{StaticResource border-radius.8}" />
  33. <Image
  34. Name="CoverImage"
  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="226"
  62. MaxHeight="44"
  63. HorizontalAlignment="Center"
  64. VerticalAlignment="Top"
  65. FontSize="14"
  66. Text="{Binding FileName}"
  67. TextTrimming="CharacterEllipsis"
  68. TextWrapping="Wrap"
  69. ToolTip="{Binding FileName}" />
  70. </StackPanel>
  71. </Grid>
  72. </UserControl>