RemoveWatermarkListControl.xaml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.RemoveWatermarkListControl"
  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:Compdfkit_Tools.PDFControl"
  7. mc:Ignorable="d"
  8. Loaded="UserControl_Loaded"
  9. xmlns:common="clr-namespace:Compdfkit_Tools.Common"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <common:SecurityResourceConverter x:Key="SecurityResourceConverter"/>
  14. <Style x:Key="CustomDataGridStyle" TargetType="DataGrid">
  15. <Setter Property="BorderBrush" Value="#E6E6E6" />
  16. <Setter Property="BorderThickness" Value="1" />
  17. <Setter Property="CellStyle">
  18. <Setter.Value>
  19. <Style TargetType="DataGridCell">
  20. <Setter Property="BorderThickness" Value="1" />
  21. <Setter Property="BorderBrush" Value="#E6E6E6" />
  22. </Style>
  23. </Setter.Value>
  24. </Setter>
  25. </Style>
  26. </ResourceDictionary>
  27. </UserControl.Resources>
  28. <Grid Margin="10,0,0,0">
  29. <Grid.RowDefinitions>
  30. <RowDefinition Height="50"></RowDefinition>
  31. <RowDefinition Height="*"></RowDefinition>
  32. </Grid.RowDefinitions>
  33. <DockPanel Grid.Row="0" Grid.Column="0">
  34. <Button x:Name="AddFilesBtn" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_AddFiles}" Height="32" Width="112" FontFamily="Microsoft YaHei" FontSize="14" HorizontalAlignment="Left" Click="AddFilesBtn_Click"></Button>
  35. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0">
  36. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_FileCount}" FontFamily="Microsoft YaHei" FontSize="14" ></TextBlock>
  37. <TextBlock FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding FileNumText}" ></TextBlock>
  38. </StackPanel>
  39. </DockPanel>
  40. <Border Grid.Row="1" Grid.Column="0" BorderBrush="#CCCCCC" BorderThickness="1">
  41. <Grid Margin="10,10,10,0">
  42. <Grid.RowDefinitions>
  43. <RowDefinition Height="*"></RowDefinition>
  44. <RowDefinition Height="50"></RowDefinition>
  45. </Grid.RowDefinitions>
  46. <Grid Grid.Row="0" VerticalAlignment="Stretch">
  47. <DataGrid Background="White" BorderBrush="#E6E6E6" x:Name="FileDataGrid" HeadersVisibility="Column"
  48. IsReadOnly="True" AutoGenerateColumns="False" FontSize="14" SelectionMode="Extended"
  49. ScrollViewer.CanContentScroll="False" HorizontalScrollBarVisibility="Auto" SelectionChanged="FileDataGrid_SelectionChanged"
  50. MouseLeftButtonDown="FileDataGrid_MouseLeftButtonDown">
  51. <DataGrid.Columns>
  52. <DataGridTextColumn Width="*" Binding="{Binding Name}" >
  53. <DataGridTextColumn.Header>
  54. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_FileName}"/>
  55. </DataGridTextColumn.Header>
  56. </DataGridTextColumn>
  57. <DataGridTextColumn Width="*" Binding="{Binding Size}">
  58. <DataGridTextColumn.Header>
  59. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_FileSize}"/>
  60. </DataGridTextColumn.Header>
  61. </DataGridTextColumn>
  62. <DataGridTextColumn Width="*" Binding="{Binding Path}">
  63. <DataGridTextColumn.Header>
  64. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_Path}"/>
  65. </DataGridTextColumn.Header>
  66. </DataGridTextColumn>
  67. </DataGrid.Columns>
  68. <DataGrid.Resources>
  69. <Style TargetType="DataGrid">
  70. <Setter Property="HorizontalGridLinesBrush" Value="#E6E6E6" />
  71. <Setter Property="VerticalGridLinesBrush" Value="#E6E6E6" />
  72. </Style>
  73. <Style TargetType="DataGridColumnHeader">
  74. <Setter Property="Foreground" Value="#666666" />
  75. <Setter Property="FontFamily" Value="Microsoft YaHei" />
  76. <Setter Property="FontSize" Value="12" />
  77. </Style>
  78. <Style TargetType="DataGridCell">
  79. <Setter Property="FontFamily" Value="Microsoft YaHei" />
  80. <Setter Property="FontSize" Value="12" />
  81. <Setter Property="Foreground" Value="#666666" />
  82. <Setter Property="BorderThickness" Value="0"></Setter>
  83. <Style.Triggers>
  84. <Trigger Property="IsSelected" Value="True">
  85. <Setter Property="Background" Value="#0078D7" />
  86. <Setter Property="Foreground" Value="White" />
  87. </Trigger>
  88. </Style.Triggers>
  89. </Style>
  90. </DataGrid.Resources>
  91. </DataGrid>
  92. </Grid>
  93. <StackPanel Grid.Row="1" Orientation="Horizontal">
  94. <Button x:Name="RemoveBtn" FontFamily="Microsoft YaHei" FontSize="14" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_RemoveAll}" Padding="5,0,5,0" Height="32" HorizontalAlignment="Left" Click="RemoveBtn_Click"></Button>
  95. </StackPanel>
  96. </Grid>
  97. </Border>
  98. </Grid>
  99. </UserControl>