123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageHeaderFooter.HomePageHeaderFooterDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:cus="clr-namespace:PDF_Office.CustomControl"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- prism:ViewModelLocator.AutoWireViewModel="True"
- xmlns:convert="clr-namespace:PDF_Office.DataConvert"
- d:DesignHeight="600"
- d:DesignWidth="818"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <convert:UnVisivleConvert x:Key="unVisibleConvert"/>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid IsEnabled="{Binding HeaderFooterGridIsEnabled}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="558*"/>
- <ColumnDefinition Width="260*" MaxWidth="260"/>
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <Grid.RowDefinitions>
- <RowDefinition Height="556*"/>
- <RowDefinition Height="64*" MaxHeight="64"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" AllowDrop="True"
- Drop="Grid_Drop"
- DragEnter="MainPage_DragEnter"
- DragOver="MainPage_DragOver"
- DragLeave="MainPage_DragLeave"
- >
- <Label Name="DropGrid" Background="#18A0FB" Opacity="0.5" Panel.ZIndex="1" Visibility="Collapsed"/>
- <Button Name="BtnBlank" Background="Green" Height="300" Width="300" Visibility="{Binding AddFileVisibility}" Command="{Binding ADDPDFCommand}" >
- </Button>
- <ListView x:Name="listView" DataContext="{Binding PDFDataTable,Mode=TwoWay}" Grid.Row="0" Background="White" ItemsSource="{Binding}" SelectionChanged="listView_SelectionChanged" Visibility="{Binding ElementName=BtnBlank, Path=Visibility, Converter={StaticResource unVisibleConvert}}">
- <ListView.ContextMenu>
- <ContextMenu StaysOpen="True" >
- <MenuItem Header="打开文件" Name="OpenFileMenuItem" Click="OpenFileMenuItem_Click"/>
- <MenuItem Header="移除" Name="RemoveFileMenuItem" Click="RemoveFileMenuItem_Click"/>
- </ContextMenu>
- </ListView.ContextMenu>
- <ListView.View>
- <GridView>
- <GridViewColumn Header="文档名" Width="234" DisplayMemberBinding="{Binding FileName}"/>
- <GridViewColumn Header="页面范围" Width="156" >
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <cus:WritableComboBox Height="24" Width="140" Margin="0,8,0,0" Text="{Binding FilePageRangeText,Mode=TwoWay}" SelectedIndex="{Binding FilePageRangeSelectIndex,Mode=TwoWay}" EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}" LostFocus="PageRangeWritableComboBox_LostFocus"></cus:WritableComboBox>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- <GridViewColumn Header="大小" Width="68" DisplayMemberBinding="{Binding FileSize}"/>
- <GridViewColumn Header="状态" Width="80" >
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding FileState}" Width="14" Height="14" TextDecorations="Underline" Foreground="Black"/>
- <Button Name="DeleteTemplateBtn" Width="14" Height="14" Content="X" Foreground="Red" FontSize="8" VerticalAlignment="Center" Margin="38,0,0,0" Click="DeleteTemplateBtn_Click">
- </Button>
- </StackPanel>
- <DataTemplate.Triggers>
- <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
- <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="False">
- <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Hidden"/>
- </DataTrigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- </GridView>
- </ListView.View>
- <ListView.ItemContainerStyle>
- <Style TargetType="ListViewItem">
- <Setter Property="Height" Value="42"/>
- <Style.Triggers>
- <Trigger Property="ListView.AlternationIndex" Value="1">
- <Setter Property="Background" Value="LightGray"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </ListView.ItemContainerStyle>
- </ListView>
- </Grid>
- <Grid Grid.Row="1">
- <Button x:Name="MenuBtn" Width="113"
- Height="40"
- Margin="25,0,0,0"
- HorizontalAlignment="Left" Click="Menu_Click">
- <StackPanel Orientation="Horizontal" >
- <Border HorizontalAlignment="Right">
- <TextBlock Text="添加文件" FontSize="18" Foreground="Black"></TextBlock>
- </Border>
- <Border Margin="12,0,0,0">
- <Path VerticalAlignment="Center" HorizontalAlignment="Right" Stroke="Black" Data="M0 0L8 4 L16 0" Height="10" Stretch="Fill" />
- </Border>
- </StackPanel>
- </Button>
- <Popup x:Name="menuPop1" StaysOpen="False" AllowsTransparency="True" PlacementTarget="{Binding ElementName=MenuBtn}">
- <Grid Height="auto" Width="auto" HorizontalAlignment="Left">
- <Border BorderThickness="0" CornerRadius="3" Background="White" Margin="3">
- <Border.Effect>
- <DropShadowEffect ShadowDepth="0" Color="#FFB6B6B6"/>
- </Border.Effect>
- <StackPanel Margin="0">
- <MenuItem x:Name="添加文件" Header="添加文件" Command="{Binding ADDPDFCommand}"></MenuItem>
- <MenuItem x:Name="添加文件夹" Header="添加文件夹" Command="{Binding ADDPDFFilesCommand}"></MenuItem>
- </StackPanel>
- </Border>
- </Grid>
- </Popup>
- <Button
- Width="40"
- Height="40"
- Margin="0,0,90,0"
- HorizontalAlignment="Right">
- </Button>
- <Button
- Width="40"
- Height="40"
- Margin="25,0"
- HorizontalAlignment="Right"
- IsEnabled="{Binding RemoveIsEnable}"
- Command="{Binding RemovePDFFileCommand}"
- >
- </Button>
- </Grid>
- </Grid>
- <Grid Grid.Column="1" Background="WhiteSmoke" IsEnabled="{Binding SetHeaderFooterGridIsEnabled}">
- <Grid.RowDefinitions>
- <RowDefinition Height="536"/>
- <RowDefinition Height="64"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Background="#F3F3F3" Grid.RowSpan="{Binding CreateGridSpan}">
- <ContentControl prism:RegionManager.RegionName="{Binding HeaderFooterSettingsRegionName}" Visibility="{Binding HeaderFooterSettingsVisible}"></ContentControl>
- </Grid>
- <Grid Grid.Row="1" Visibility="{Binding CreateGridSpanVisibility}">
- <Button Height="32" Width="228" Background="Black" Command="{Binding CreateCommand}">
- <TextBlock Text="Apply" FontSize="18" Foreground="White"/>
- </Button>
- </Grid>
- </Grid>
- </Grid>
- </UserControl>
|