PDFToolItem.xaml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <UserControl x:Class="PDF_Office.Views.HomePanel.PDFTools.PDFToolItem"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Office.Views.HomePanel"
  7. xmlns:convert="clr-namespace:PDF_Office.DataConvert"
  8. mc:Ignorable="d"
  9. x:Name="usercontrol"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.Resources>
  12. <convert:BoolToVisible x:Key="boolToVisible"/>
  13. <convert:InvertBoolToVisibleConvert x:Key="invertBoolToVisibleConvert"/>
  14. </UserControl.Resources>
  15. <Grid Margin="1,1,1,1">
  16. <Border x:Name="BorderExtend" Height="108" CornerRadius="8" Background="White" BorderThickness="2"
  17. Visibility="{Binding ElementName=usercontrol,Path=IsShowConciseContent,Converter={StaticResource invertBoolToVisibleConvert}}">
  18. <Grid Background="Transparent" MouseEnter="Border_MouseEnter" MouseLeave="Border_MouseLeave">
  19. <Grid Margin="10">
  20. <Grid.ColumnDefinitions>
  21. <ColumnDefinition Width="auto"></ColumnDefinition>
  22. <ColumnDefinition Width="*"></ColumnDefinition>
  23. </Grid.ColumnDefinitions>
  24. <Grid.RowDefinitions>
  25. <RowDefinition Height="auto"></RowDefinition>
  26. <RowDefinition Height="*"></RowDefinition>
  27. </Grid.RowDefinitions>
  28. <Image VerticalAlignment="Top" Source="{Binding Image}" HorizontalAlignment="Center" Width="28" Height="28" Margin="5,10,5,5" />
  29. <TextBlock Name="TxbTitle" Grid.Column="1" Text="{Binding Name}"
  30. FontSize="14" FontWeight="SemiBold" Foreground="Black"
  31. VerticalAlignment="Top" Margin="0,15,0,0"></TextBlock>
  32. <StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="6,0,6,0">
  33. <Grid>
  34. <TextBlock Name="ToolInfoBlock" Text="{Binding NameInfo}"
  35. Foreground="#666666" LineHeight="16" FontSize="12" TextWrapping="Wrap" VerticalAlignment="Center" Margin="0,8,0,0"></TextBlock>
  36. </Grid>
  37. </StackPanel>
  38. </Grid>
  39. </Grid>
  40. </Border>
  41. <Border x:Name="BorderConcise" Height="64" CornerRadius="8" Background="White" BorderThickness="2" BorderBrush="#04000000" Visibility="{Binding ElementName=usercontrol,Path=IsShowConciseContent,Converter={StaticResource boolToVisible}}">
  42. <Grid Background="Transparent" MouseEnter="Border_MouseEnter" MouseLeave="Border_MouseLeave">
  43. <Grid.ColumnDefinitions>
  44. <ColumnDefinition Width="auto"/>
  45. <ColumnDefinition Width="*"/>
  46. </Grid.ColumnDefinitions>
  47. <Grid x:Name="GridToolMaskConcise" Grid.ColumnSpan="2" Background="#477EDE" Visibility="Collapsed"/>
  48. <Image VerticalAlignment="Top" Source="{Binding Image}" HorizontalAlignment="Center" Width="28" Height="28" Margin="5,10,5,5" />
  49. <TextBlock Name="TxbTitleConcise" Grid.Column="1" Text="{Binding Name}" FontSize="14" FontWeight="SemiBold" VerticalAlignment="Top" Margin="0,15,0,0"></TextBlock>
  50. </Grid>
  51. </Border>
  52. </Grid>
  53. </UserControl>