123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618 |
- <UserControl
- x:Class="PDF_Master.Views.PageEdit.PageEditContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:convert="clr-namespace:PDF_Master.DataConvert"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
- xmlns:cussys="clr-namespace:PDF_Master.CustomControl.SystemControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Master.Views.PageEdit"
- xmlns:mainpage="clr-namespace:PDF_Master.Strings.MainPage"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:model="clr-namespace:PDF_Master.Model"
- xmlns:pageedit="clr-namespace:PDF_Master.Model.PageEdit"
- xmlns:pageedit1="clr-namespace:PDF_Master.ViewModels.PageEdit"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:viewmodel="clr-namespace:PDF_Master.ViewModels.PageEdit"
- xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
- Name="PageEdit"
- d:DataContext="{d:DesignInstance Type=pageedit1:PageEditContentViewModel}"
- d:DesignHeight="450"
- d:DesignWidth="800"
- prism:ViewModelLocator.AutoWireViewModel="True"
- FocusVisualStyle="{x:Null}"
- IsVisibleChanged="PageEdit_IsVisibleChanged"
- Loaded="PageEdit_Loaded"
- SizeChanged="PageEdit_SizeChanged"
- Unloaded="PageEdit_Unloaded"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
- <convert:UnVisivleConvert x:Key="UnVisibleConvert" />
- <convert:BoolToFontSizeConverter x:Key="BoolToFontSizeConverter" />
- <DataTemplate x:Key="PageEditListBoxItemTemplate" DataType="{x:Type pageedit:PageEditItem}">
- <Grid Name="BdRoot">
- <StackPanel AllowDrop="True">
- <Border
- Name="BdBorder"
- VerticalAlignment="Top"
- BorderBrush="Transparent"
- BorderThickness="2"
- CornerRadius="0">
- <Grid
- Name="GridRoot"
- Width="{Binding ItemSize.Width}"
- Height="{Binding ItemSize.Height}"
- Margin="1"
- Background="Transparent">
- <Image
- RenderOptions.BitmapScalingMode="HighQuality"
- Source="{Binding Image}"
- Stretch="Uniform"
- UseLayoutRounding="True" />
- <Border
- Width="18"
- Height="20"
- Margin="0,10,10,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Visibility="{Binding HaveBookMark, Converter={StaticResource BoolToVisibleConvert}}">
- <Path Data="M1.75 17.7778V0H0.25V19C0.25 19.2608 0.385462 19.5028 0.607729 19.6392C0.829997 19.7756 1.10716 19.7868 1.33966 19.6687L9 15.7775L16.6603 19.6687C16.8928 19.7868 17.17 19.7756 17.3923 19.6392C17.6145 19.5028 17.75 19.2608 17.75 19V0H16.25V17.7778L9.33966 14.2676C9.1262 14.1592 8.8738 14.1592 8.66034 14.2676L1.75 17.7778Z" Stroke="{StaticResource color.icon.base.accent}" />
- </Border>
- </Grid>
- </Border>
- <Border
- Name="BdPageNum"
- Margin="0,4,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- Background="Transparent">
- <StackPanel
- Name="StkpnlButtom"
- Width="auto"
- MinWidth="10"
- HorizontalAlignment="Center"
- Background="Transparent">
- <TextBlock
- Width="auto"
- Height="22"
- Margin="0,4"
- HorizontalAlignment="Center"
- FontSize="14"
- Text="{Binding PageNumber}" />
- <TextBlock
- Width="auto"
- MinHeight="22"
- MaxWidth="{Binding ElementName=GridRoot, Path=ActualWidth}"
- HorizontalAlignment="Center"
- FontSize="{Binding FontSize}"
- Foreground="{StaticResource color.sys.text.neutral.lv2}"
- Text="{Binding PageSize}"
- TextWrapping="Wrap"
- Visibility="{Binding ShowPageSize, Converter={StaticResource BoolToVisibleConvert}}" />
- </StackPanel>
- </Border>
- </StackPanel>
- </Grid>
- </DataTemplate>
- <ContextMenu
- x:Key="ListBoxItemMenu"
- DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
- Loaded="ContextMenu_Loaded">
- <MenuItem
- Header="{Binding T_InsertPage}"
- Tag="Insert"
- Visibility="Visible">
- <MenuItem
- Command="{Binding InsertCommand}"
- CommandParameter="{x:Static model:ParameterNames.InsertType_File}"
- Header="{Binding T_Insert}" />
- <MenuItem
- Command="{Binding InsertCommand}"
- CommandParameter="{x:Static model:ParameterNames.InsertType_Blank}"
- Header="{Binding T_InsertaBlankPage}" />
- <MenuItem
- Command="{Binding InsertCommand}"
- CommandParameter="{x:Static model:ParameterNames.InsertType_Custom}"
- Header="{Binding T_InsertaCustomPage}" />
- </MenuItem>
- <MenuItem
- Command="{Binding ExtractCommand}"
- Header="{Binding T_ExtractPage}"
- Tag="Extract"
- Visibility="Visible" />
- <MenuItem
- Command="{Binding ReplaceCommand}"
- Header="{Binding T_ReplacePage}"
- Tag="Replace"
- Visibility="{Binding IsBOTAThumb, Converter={StaticResource UnvisibleConvert}}" />
- <MenuItem
- Command="{Binding SplitCommand}"
- Header="{Binding T_Split}"
- Tag="Split"
- Visibility="Visible" />
- <MenuItem
- Command="{Binding ReverseCommand}"
- Header="{Binding T_Reverse}"
- Tag="Reverse"
- Visibility="Visible" />
- <MenuItem Command="{Binding DeleteCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuDelete}" />
- <MenuItem
- Command="{Binding EnterPageEditCommand}"
- Header="Enter Page Edit"
- Visibility="{Binding IsBOTAThumb}" />
- <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
- <MenuItem Command="{Binding RightRotateCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuRotateClockwise}" />
- <MenuItem Command="{Binding LeftRotateCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuRotateCounterclockwise}" />
- <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
- <MenuItem Command="{Binding CopyCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuCopy}" />
- <MenuItem Command="{Binding CutCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuCut}" />
- <MenuItem Command="{Binding PasteCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuPaste}" />
- <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
- <MenuItem
- Command="{Binding ShowPageSizeCommand}"
- Header="{x:Static mainpage:MainPage.PageEdite_DisplayPageSize}"
- Visibility="{Binding ShowedPageSize}" />
- <MenuItem
- Name="MenuHidePageSize"
- Command="{Binding ShowPageSizeCommand}"
- Header="{x:Static mainpage:MainPage.PageEdite_HidePageSize}"
- Visibility="{Binding HidePageSize}" />
- <Separator Style="{StaticResource HorizontalSeparatorStyle}" Visibility="{Binding IsBOTAThumb, Converter={StaticResource UnVisibleConvert}}" />
- <MenuItem Click="MenuItem_Click" Header="{x:Static mainpage:MainPage.PageEdit_MenuPrint}" />
- </ContextMenu>
- <Style BasedOn="{StaticResource subToolBar}" TargetType="{x:Type Button}">
- <Setter Property="Width" Value="28" />
- <Setter Property="Height" Value="28" />
- </Style>
- <Style TargetType="{x:Type Path}">
- <Setter Property="Fill" Value="{StaticResource color.icon.base.brand}" />
- </Style>
- </ResourceDictionary>
- </UserControl.Resources>
- <UserControl.InputBindings>
- <KeyBinding Command="{Binding CopyCommand}" Gesture="Ctrl+C" />
- <KeyBinding Command="{Binding PasteCommand}" Gesture="Ctrl+V" />
- <KeyBinding Command="{Binding CutCommand}" Gesture="Ctrl+X" />
- <KeyBinding Command="{Binding RightRotateCommand}" Gesture="Ctrl+R" />
- <KeyBinding Command="{Binding LeftRotateCommand}" Gesture="Ctrl+L" />
- <KeyBinding Command="{Binding DeleteCommand}" Gesture="Delete" />
- <KeyBinding Key="Esc" Command="{Binding ClearSelectedCommand}" />
- <KeyBinding
- Key="Add"
- Command="{Binding ZoomInCommand}"
- Modifiers="Ctrl" />
- <KeyBinding
- Key="Subtract"
- Command="{Binding ZoomOutCommand}"
- Modifiers="Ctrl" />
- </UserControl.InputBindings>
- <Border
- AllowDrop="True"
- BorderBrush="#F2F2F2"
- BorderThickness="0,1,0,0"
- Drop="Border_Drop">
- <Grid
- DragLeave="Grid_DragLeave"
- DragOver="Grid_DragOver"
- Drop="Grid_Drop"
- PreviewDragEnter="Grid_PreviewDragEnter">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid
- Name="GridHeader"
- Height="40"
- Background="{StaticResource color.sys.layout.mg}"
- Focusable="True"
- PreviewMouseLeftButtonDown="Grid_PreviewMouseLeftButtonDown">
- <StackPanel
- Name="StkpnlCenter"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <Grid>
- <ComboBox
- Name="CmbPageRange"
- Width="123"
- Height="23"
- InputMethod.IsInputMethodEnabled="False"
- IsEditable="True"
- ItemsSource="{Binding PageRangeItems}"
- LostFocus="TextBoxEx_LostFocus"
- PreviewTextInput="CmbPageRange_PreviewTextInput"
- SelectedIndex="{Binding ComboxSelectIndex, Mode=TwoWay}"
- Text="{Binding TbPageRange, Mode=TwoWay}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="PreviewKeyDown">
- <i:InvokeCommandAction Command="{Binding PreviewKeyDown}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- </Grid>
- <Button
- Margin="5"
- Command="{Binding LeftRotateCommand}"
- ToolTip="{Binding T_RotateLeftToolTip}">
- <Path
- Width="29"
- Height="28"
- Data="M9.61772 12.8118C10.1691 10.0672 12.5932 8 15.5001 8C18.8138 8 21.5001 10.6863 21.5001 14C21.5001 17.3137 18.8138 20 15.5001 20C14.4056 20 13.3823 19.7078 12.5008 19.1979L11.4994 20.9291C12.6771 21.6104 14.0446 22 15.5001 22C19.9184 22 23.5001 18.4183 23.5001 14C23.5001 9.58172 19.9184 6 15.5001 6C11.6625 6 8.45601 8.70211 7.67946 12.3075L6.58239 10.4073L4.85034 11.4073L7.15034 15.3911C7.42648 15.8694 8.03807 16.0332 8.51637 15.7571L12.5001 13.4571L11.5001 11.725L9.61772 12.8118Z" />
- </Button>
- <Button
- Margin="5"
- Command="{Binding RightRotateCommand}"
- ToolTip="{Binding T_RotateRightToolTip}">
- <Path
- Width="29"
- Height="28"
- Data="M19.4129 12.9758C18.9269 10.15 16.4645 8 13.5 8C10.1863 8 7.5 10.6863 7.5 14C7.5 17.3137 10.1863 20 13.5 20C14.5945 20 15.6178 19.7078 16.4993 19.1979L17.5007 20.9291C16.323 21.6104 14.9555 22 13.5 22C9.08172 22 5.5 18.4183 5.5 14C5.5 9.58172 9.08172 6 13.5 6C17.1531 6 20.2343 8.44856 21.192 11.794L21.7091 9.86404L23.641 10.3817L22.4504 14.8249C22.3075 15.3584 21.7591 15.675 21.2257 15.532L16.7824 14.3415L17.3 12.4096L19.4129 12.9758Z" />
- </Button>
- <Separator
- Name="Separator"
- Width="1"
- Height="24"
- Margin="5,0"
- BorderBrush="#33000000"
- BorderThickness="5"
- Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
- <!--<Menu
- Width="65"
- Height="20"
- Margin="5"
- Visibility="Visible">
- <MenuItem
- Width="65"
- Height="20"
- Header="插入">
- <MenuItem
- Command="{Binding InsertCommand}"
- CommandParameter="{x:Static model:ParameterNames.InsertType_File}"
- Header="插入文件" />
- <MenuItem
- Command="{Binding InsertCommand}"
- CommandParameter="{x:Static model:ParameterNames.InsertType_Blank}"
- Header="插入空白页" />
- <MenuItem
- Command="{Binding InsertCommand}"
- CommandParameter="{x:Static model:ParameterNames.InsertType_Custom}"
- Header="插入自定义页面" />
- </MenuItem>
- </Menu>-->
- <Button
- Name="BtnInsert"
- Click="BtnInsert_Click"
- Initialized="BtnInsert_Initialized"
- Style="{StaticResource InsideBarBtnStyle}"
- Visibility="Visible">
- <StackPanel Margin="4,0,4,0" Orientation="Horizontal">
- <Grid Margin="0,0,6,0">
- <Path Data="M10.5 18H4.5V2H12.3671L16.5 6.74847V10H18.5V6.74847C18.5 6.26584 18.3255 5.79948 18.0086 5.43542L13.8757 0.686951C13.4958 0.250541 12.9456 0 12.3671 0H4.5C3.39543 0 2.5 0.895431 2.5 2V18C2.5 19.1046 3.39543 20 4.5 20H10.5V18Z " Fill="#273C62" />
- <Path Data="M16.5 14V11H14.5V14H11.5V16H14.5V19H16.5V16H19.5V14H16.5Z " Fill="#94989C" />
- </Grid>
- <TextBlock VerticalAlignment="Center" Text="{Binding T_InsertFile}" />
- <Path
- Width="12"
- Height="12"
- Margin="3,0,0,0"
- Data="M6.5 10L11.5 4H1.5L6.5 10Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </StackPanel>
- <Button.ContextMenu>
- <ContextMenu Name="MenuInsert" Placement="Bottom">
- <MenuItem
- Command="{Binding InsertCommand}"
- CommandParameter="{x:Static model:ParameterNames.InsertType_File}"
- Header="{Binding T_Insert}" />
- <MenuItem
- Command="{Binding InsertCommand}"
- CommandParameter="{x:Static model:ParameterNames.InsertType_Blank}"
- Header="{Binding T_InsertaBlankPage}" />
- <MenuItem
- Command="{Binding InsertCommand}"
- CommandParameter="{x:Static model:ParameterNames.InsertType_Custom}"
- Header="{Binding T_InsertaCustomPage}" />
- </ContextMenu>
- </Button.ContextMenu>
- </Button>
- <!--<Button
- Margin="5"
- Command="{Binding ExtractCommand}"
- Content="提取"
- Visibility="Visible" />-->
- <Button
- Width="75"
- Margin="5"
- HorizontalContentAlignment="Left"
- Command="{Binding ExtractCommand}"
- Visibility="Visible">
- <StackPanel Margin="4,0" Orientation="Horizontal">
- <Grid Margin="0,0,8,0">
- <Path Data="M10.5 18H4.5V2H12.3671L16.5 6.74847V10H18.5V6.74847C18.5 6.26584 18.3255 5.79948 18.0086 5.43542L13.8757 0.686951C13.4958 0.250541 12.9456 0 12.3671 0H4.5C3.39543 0 2.5 0.895431 2.5 2V18C2.5 19.1046 3.39543 20 4.5 20H10.5V18Z" Fill="#273C62" />
- <Path Data="M15.5087 15.6569H10.5V13.681H15.8487L14.5753 12.4112L15.9915 10.999L18.7937 13.7933L19.5018 14.4995L18.7937 15.2056L18.4258 15.5725V15.6569H18.3411L15.9915 17.9999L14.5753 16.5877L15.5087 15.6569Z" Fill="#94989C" />
- </Grid>
- <TextBlock VerticalAlignment="Center" Text="{Binding T_Extract}" />
- </StackPanel>
- </Button>
- <!--<Button
- Margin="5"
- Command="{Binding ReplaceCommand}"
- Content="替换"
- Visibility="Visible" />-->
- <Button
- Width="80"
- Margin="5"
- HorizontalContentAlignment="Left"
- Command="{Binding ReplaceCommand}"
- Visibility="Visible">
- <StackPanel Margin="4,0" Orientation="Horizontal">
- <Grid Margin="0,0,8,0">
- <Path Data="M10.5 18H4.5V2H12.3671L16.5 6.74847V10H18.5V6.74847C18.5 6.26584 18.3255 5.79948 18.0086 5.43542L13.8757 0.686951C13.4958 0.250541 12.9456 0 12.3671 0H4.5C3.39543 0 2.5 0.895431 2.5 2V18C2.5 19.1046 3.39543 20 4.5 20H10.5V18Z" Fill="#273C62" />
- <Path Data="M18.207 12.793L15.707 10.293L14.2928 11.7072L15.0857 12.5001H11.4999V14.5001H17.4999H19.9141L18.207 12.793ZM12.7928 17.2072L15.2928 19.7072L16.707 18.293L15.9141 17.5001H19.4999V15.5001H13.4999H11.0857L12.7928 17.2072Z" Fill="#94989C" />
- </Grid>
- <TextBlock VerticalAlignment="Center" Text="{Binding T_Replace}" />
- </StackPanel>
- </Button>
- <!--<Button
- Margin="5"
- Command="{Binding SplitCommand}"
- Content="拆分"
- Visibility="Visible" />-->
- <Button
- Width="68"
- Margin="5"
- HorizontalContentAlignment="Left"
- Command="{Binding SplitCommand}"
- Visibility="Visible">
- <StackPanel Margin="4,0" Orientation="Horizontal">
- <Grid Margin="0,0,8,0">
- <Path Data="M16.5 18H4.5V12H2.5V18C2.5 19.1046 3.39543 20 4.5 20H16.5C17.6046 20 18.5 19.1046 18.5 18V12H16.5V18ZM4.5 8V2H12.3671L16.5 6.74847V8H18.5V6.74847C18.5 6.26584 18.3255 5.79948 18.0086 5.43542L13.8757 0.686951C13.4958 0.250541 12.9456 0 12.3671 0H4.5C3.39543 0 2.5 0.895431 2.5 2V8H4.5Z" Fill="#273C62" />
- <Path Data="M1 9H4V11H1V9ZM5 9H8V11H5V9ZM12 9H9V11H12V9ZM13 9H16V11H13V9ZM20 9H17V11H20V9Z" Fill="#94989C" />
- </Grid>
- <TextBlock VerticalAlignment="Center" Text="{Binding T_Split}" />
- </StackPanel>
- </Button>
- <!--<Button
- Margin="5"
- Command="{Binding ReverseCommand}"
- Content="倒序"
- Visibility="Visible" />-->
- <Button
- Width="80"
- Margin="5"
- HorizontalContentAlignment="Left"
- Command="{Binding ReverseCommand}"
- Visibility="Visible">
- <StackPanel Margin="4,0" Orientation="Horizontal">
- <Grid Margin="0,0,8,0">
- <Path Data="M2.5 18H13V6.74847L8.86707 2H2.5L2.5 18ZM2.5 0C1.39543 0 0.5 0.895431 0.5 2V18C0.5 19.1046 1.39543 20 2.5 20H13C14.1046 20 15 19.1046 15 18V6.74847C15 6.26584 14.8255 5.79948 14.5086 5.43542L10.3757 0.686951C9.99584 0.250541 9.44563 0 8.86707 0H2.5Z" Fill="#273C62" />
- <Path Data="M16 0.379883L17.8137 2.9191L20.3137 6.41909L18.6863 7.58157L18 6.6208V20.0003H16V3.50034V0.379883Z" Fill="#94989C" />
- </Grid>
- <TextBlock VerticalAlignment="Center" Text="{Binding T_Reverse}" />
- </StackPanel>
- </Button>
- <Separator
- Width="1"
- Height="24"
- Margin="5,0"
- BorderBrush="#33000000"
- BorderThickness="5"
- Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}"
- Visibility="Visible" />
- <Button
- Margin="5"
- Command="{Binding DeleteCommand}"
- ToolTip="{Binding T_DeleteToolTip}">
- <Path
- Width="29"
- Height="28"
- Data="M12.5 6H16.5V4H12.5V6ZM21.5 9H23.5V7H19.5H9.5H5.5V9H7.5V22C7.5 23.1046 8.39543 24 9.5 24H19.5C20.6046 24 21.5 23.1046 21.5 22V9ZM19.5 9H9.5V22H19.5V9ZM13.5 19L13.5 12H15.5V19H13.5Z" />
- </Button>
- </StackPanel>
- <StackPanel
- Name="StkpnlRight"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
- <Button Margin="4" Command="{Binding ZoomOutCommand}">
- <Path
- Width="28"
- Height="28"
- Data="M20 12.5C20 16.0899 17.0899 19 13.5 19C9.91015 19 7 16.0899 7 12.5C7 8.91015 9.91015 6 13.5 6C17.0899 6 20 8.91015 20 12.5ZM18.2928 19.5209C16.9284 20.4541 15.2779 21 13.5 21C8.80558 21 5 17.1944 5 12.5C5 7.80558 8.80558 4 13.5 4C18.1944 4 22 7.80558 22 12.5C22 14.6954 21.1677 16.6965 19.8013 18.2048L23.4741 22.0603L22.026 23.4397L18.2928 19.5209ZM10 11.5H17V13.5H10V11.5Z" />
- </Button>
- <Button Margin="4" Command="{Binding ZoomInCommand}">
- <Path
- Width="28"
- Height="28"
- Data="M20 12.5C20 16.0899 17.0899 19 13.5 19C9.91015 19 7 16.0899 7 12.5C7 8.91015 9.91015 6 13.5 6C17.0899 6 20 8.91015 20 12.5ZM18.2928 19.5209C16.9284 20.4541 15.2779 21 13.5 21C8.80558 21 5 17.1944 5 12.5C5 7.80558 8.80558 4 13.5 4C18.1944 4 22 7.80558 22 12.5C22 14.6954 21.1677 16.6965 19.8013 18.2048L23.4741 22.0603L22.026 23.4397L18.2928 19.5209ZM12.5 9V11.5H10V13.5H12.5V16H14.5V13.5H17V11.5H14.5V9H12.5Z" />
- </Button>
- </StackPanel>
- </Grid>
- <Border
- Name="GridBOTAHeader"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="0,0,0,1"
- Visibility="{Binding IsBOTAThumb}">
- <Grid
- Height="52"
- VerticalAlignment="Center"
- Background="{StaticResource color.sys.layout.mg}">
- <TextBlock
- Margin="16,0"
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="14"
- FontWeight="SemiBold"
- LineHeight="20"
- Text="{Binding T_Title}" />
- <ToggleButton
- Name="TbnTwoLine"
- Width="32"
- Height="32"
- Margin="16,0"
- HorizontalAlignment="Right"
- Click="TbnTwoLine_Click"
- Style="{StaticResource SubToolbarTgb}">
- <Path
- Width="32"
- Height="32"
- Data="M18.2998 21.6998V10.2998H21.6998V21.6998H18.2998ZM16.7998 9.59981C16.7998 9.15798 17.1579 8.7998 17.5998 8.7998H22.3998C22.8416 8.7998 23.1998 9.15798 23.1998 9.5998V22.3998C23.1998 22.8416 22.8416 23.1998 22.3998 23.1998H17.5998C17.1579 23.1998 16.7998 22.8416 16.7998 22.3998V9.59981ZM10.2998 21.6998V10.2998H13.6998V21.6998H10.2998ZM8.7998 9.59981C8.7998 9.15798 9.15798 8.79981 9.5998 8.79981H14.3998C14.8416 8.79981 15.1998 9.15798 15.1998 9.59981V22.3998C15.1998 22.8416 14.8416 23.1998 14.3998 23.1998H9.59981C9.15798 23.1998 8.7998 22.8416 8.7998 22.3998V9.59981Z"
- Fill="{Binding ElementName=TbnTwoLine, Path=Foreground}" />
- </ToggleButton>
- </Grid>
- </Border>
- <ListBox
- Name="ListPageEdit"
- Grid.Row="1"
- Padding="0"
- AllowDrop="True"
- BorderThickness="0"
- Drop="ListPageEdit_Drop"
- FocusVisualStyle="{x:Null}"
- ItemTemplate="{StaticResource PageEditListBoxItemTemplate}"
- ItemsSource="{Binding PageEditItems}"
- PreviewMouseLeftButtonDown="ListPageEdit_PreviewMouseLeftButtonDown"
- PreviewMouseLeftButtonUp="ListPageEdit_PreviewMouseLeftButtonUp"
- PreviewMouseMove="ListPageEdit_PreviewMouseMove"
- ScrollBar.Scroll="ListPageEdit_Scroll"
- ScrollViewer.ScrollChanged="ListPageEdit_ScrollChanged"
- SelectedIndex="{Binding ListSelectedIndex, Mode=TwoWay}"
- SelectionMode="Extended"
- VirtualizingPanel.CacheLength="1"
- VirtualizingPanel.CacheLengthUnit="Page"
- VirtualizingPanel.IsVirtualizing="False"
- VirtualizingPanel.ScrollUnit="Pixel"
- VirtualizingPanel.VirtualizationMode="Standard">
- <!--
- VirtualizingPanel.IsVirtualizing="true"会加快item加载速度,但是会导致大量绑定失败,Debug时会比较卡顿。
- 需要综合情况来看是否要启用虚拟化
- -->
- <!--
- 此处要用循环模式,否则滚动时容易误触发EndSscroll 从而频繁拿图导致卡顿
- VirtualizingPanel.ScrollUnit="Pixel" 设置鼠标每次滚动的步进值
- VirtualizingPanel.VirtualizationMode="Standard"
- 如果设置成循环模式,回导致偶现选中一页无法取消的情况
- -->
- <ListBox.ItemContainerStyle>
- <Style TargetType="{x:Type ListBoxItem}">
- <Setter Property="Template" Value="{StaticResource ListBoxItemControlTemplate}" />
- <Setter Property="Margin" Value="0,10" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Visibility" Value="{Binding Visible}" />
- <Setter Property="IsSelected" Value="{Binding Selected, Mode=OneWayToSource}" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <!--<Setter Property="IsHitTestVisible" Value="False" />-->
- <Setter Property="ContextMenu" Value="{StaticResource ListBoxItemMenu}" />
- <EventSetter Event="DragLeave" Handler="ListBoxItem_DragLeave" />
- <EventSetter Event="PreviewMouseRightButtonDown" Handler="ListBoxItem_PreviewMouseRightButtonDown" />
- <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown" />
- <EventSetter Event="PreviewMouseDoubleClick" Handler="ListBoxItem_PreviewMouseDoubleClick" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=GridBOTAHeader, Path=Visibility}" Value="Visible">
- <Setter Property="Template" Value="{StaticResource BOTAListBoxItemTemplate}" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ListBox.ItemContainerStyle>
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <!-- item间距自适应 -->
- <wpftk:VirtualizingWrapPanel />
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding SelectionChangedCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <ListBox.Style>
- <Style TargetType="{x:Type ListBox}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=GridBOTAHeader, Path=Visibility}" Value="Visible">
- <Setter Property="Background" Value="{StaticResource color.sys.layout.mg}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding ElementName=GridBOTAHeader, Path=Visibility}" Value="Collapsed">
- <Setter Property="Background" Value="{StaticResource color.sys.layout.bg.view}" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ListBox.Style>
- </ListBox>
- <!-- 框选的矩形框 -->
- <Rectangle
- Name="RectChoose"
- Grid.Row="1"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Fill="#AACCEE"
- Opacity="0.3"
- Stroke="#AACCEE"
- StrokeThickness="2" />
- <!-- 插入标记 -->
- <Line
- Name="LineInset"
- Grid.Row="1"
- AllowDrop="True"
- Drop="MidLane_Drop"
- IsHitTestVisible="False"
- Stroke="#FF477EDE"
- StrokeEndLineCap="Triangle"
- StrokeStartLineCap="Triangle"
- StrokeThickness="5"
- Visibility="Collapsed"
- X1="20"
- X2="20"
- Y1="0"
- Y2="150" />
- <!-- 拖拽虚影 -->
- <Image
- Name="ImgPicture"
- Grid.Row="1"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- AllowDrop="True"
- Drop="ImgPicture_Drop"
- Opacity="0.8"
- RenderOptions.BitmapScalingMode="HighQuality"
- UseLayoutRounding="True"
- Visibility="{Binding ElementName=LineInset, Path=Visibility}" />
- <cus:ToastControl
- Grid.Row="1"
- Width="auto"
- Height="auto"
- Margin="0,0,0,100"
- VerticalAlignment="Bottom"
- Background="#89000000"
- BeginTime="0:0:0:3"
- CornerRadius="4"
- FontSize="14"
- Foreground="White"
- StringContent="{Binding ToastText}"
- Visibility="{Binding ShowTip, Mode=TwoWay}"
- Duration="0:0:0:3" />
- <!--<ProgressBar
- Grid.Row="1"
- Width="400"
- Height="10"
- Foreground="Blue"
- IsIndeterminate="True"
- Visibility="{Binding IsLoading}" />-->
- </Grid>
- </Border>
- </UserControl>
|