DocItemControl.xaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. BorderBrush="{StaticResource color.sys.layout.divider}"
  24. BorderThickness="1"
  25. VerticalAlignment="Center"
  26. HorizontalAlignment="Center"
  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. <TextBlock
  45. Grid.Row="1"
  46. MaxWidth="226"
  47. MaxHeight="44"
  48. Margin="0,0,0,8"
  49. HorizontalAlignment="Center"
  50. VerticalAlignment="Top"
  51. FontSize="14"
  52. Text="{Binding FileName}"
  53. TextTrimming="CharacterEllipsis"
  54. TextWrapping="Wrap"
  55. ToolTip="{Binding FileName}" />
  56. </Grid>
  57. </UserControl>