1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <UserControl x:Class="ComPDFKit.Controls.PDFControl.FileGridListControl"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:ComPDFKit.Controls.PDFControl"
- xmlns:pdfControl="clr-namespace:ComPDFKit.Controls.PDFControl"
- xmlns:common="clr-namespace:ComPDFKit.Controls.Common"
- mc:Ignorable="d"
- Height="390" Width="646">
- <UserControl.Resources>
- <ResourceDictionary>
- <common:SecurityResourceConverter x:Key="SecurityResourceConverter"/>
- <Style x:Key="CustomDataGridStyle" TargetType="DataGrid">
- <Setter Property="BorderBrush" Value="#E6E6E6" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="CellStyle">
- <Setter.Value>
- <Style TargetType="DataGridCell">
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="BorderBrush" Value="#E6E6E6" />
- </Style>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid Margin="10,0,10,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="50"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
- <DockPanel Grid.Row="0" Grid.Column="0">
- <Button Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_AddFiles}" Height="32" MinWidth="112" FontFamily="Microsoft YaHei" FontSize="14" Padding="28,6,27,6" HorizontalAlignment="Left" Click="AddFiles_Click"></Button>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
- <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_FileCount}" FontFamily="Microsoft YaHei" FontSize="14"></TextBlock>
- <TextBlock FontFamily="Microsoft YaHei" FontSize="14" Text="{Binding FileNumText}"></TextBlock>
- </StackPanel>
- </DockPanel>
- <Border Grid.Row="1" Grid.Column="0" BorderBrush="#CCCCCC" BorderThickness="1">
- <Grid Margin="10,10,10,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="50"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" VerticalAlignment="Stretch">
- <DataGrid Background="White" BorderBrush="#E6E6E6" x:Name="FileDataGrid" HeadersVisibility="Column"
- IsReadOnly="True" AutoGenerateColumns="False" FontSize="14" SelectionMode="Extended"
- ScrollViewer.CanContentScroll="False" HorizontalScrollBarVisibility="Auto" MouseLeftButtonDown="FileDataGrid_OnMouseLeftButtonDown" SelectionChanged="FileDataGrid_SelectionChanged">
- <DataGrid.Columns>
- <DataGridTextColumn Width="*" Binding="{Binding FileName}" >
- <DataGridTextColumn.Header>
- <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_FileName}"/>
- </DataGridTextColumn.Header>
- </DataGridTextColumn>
- <DataGridTextColumn Width="*" Binding="{Binding Size}">
- <DataGridTextColumn.Header>
- <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_FileSize}"/>
- </DataGridTextColumn.Header>
- </DataGridTextColumn>
- <DataGridTextColumn Width="*" Binding="{Binding Location}">
- <DataGridTextColumn.Header>
- <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter},ConverterParameter=Table_Path}"/>
- </DataGridTextColumn.Header>
- </DataGridTextColumn>
- </DataGrid.Columns>
- <DataGrid.Resources>
- <Style TargetType="DataGrid">
- <Setter Property="HorizontalGridLinesBrush" Value="#E6E6E6" />
- <Setter Property="VerticalGridLinesBrush" Value="#E6E6E6" />
- </Style>
- <Style TargetType="DataGridColumnHeader">
- <Setter Property="Foreground" Value="#666666" />
- <Setter Property="FontFamily" Value="Microsoft YaHei" />
- <Setter Property="FontSize" Value="12" />
- </Style>
- <Style TargetType="DataGridCell">
- <Setter Property="FontFamily" Value="Microsoft YaHei" />
- <Setter Property="FontSize" Value="12" />
- <Setter Property="Foreground" Value="#666666" />
- <Setter Property="BorderThickness" Value="0"></Setter>
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="#0078D7" />
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.Resources>
- </DataGrid>
- </Grid>
- <Button Grid.Row="1" x:Name="BtnRemove" FontFamily="Microsoft YaHei" FontSize="14" Content="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_RemoveAll}" MinWidth="112" Padding="5,0,5,0" Height="32" HorizontalAlignment="Left" Click="Remove_Click"></Button>
- </Grid>
- </Border>
- </Grid>
- </UserControl>
|