123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- <UserControl
- x:Class="PDF_Office.Views.Tools.ToolsBarContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:convert="clr-namespace:PDF_Office.DataConvert"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Office.ViewModels.Tools"
- xmlns:prism="http://prismlibrary.com/"
- prism:ViewModelLocator.AutoWireViewModel="True">
- <UserControl.Resources>
- <convert:InvertBoolConvert x:Key="InvertBoolConvert" />
- </UserControl.Resources>
- <Border
- x:Name="ToolsBorder"
- Height="40"
- BorderBrush="#1A000000"
- BorderThickness="0,1,0,1">
- <Grid Height="40" HorizontalAlignment="Center">
- <Grid VerticalAlignment="Center">
- <StackPanel Orientation="Horizontal" UseLayoutRounding="False">
- <Button Command="{Binding CompressCommand}" Style="{StaticResource InsideBarBtnStyle}">
- <StackPanel Margin="4,0,4,0" Orientation="Horizontal">
- <StackPanel Margin="0,0,4,0">
- <Grid>
- <Path
- Data="M16 19H4C3.44772 19 3 18.5523 3 18V2C3 1.44772 3.44772 1 4 1H11.8671C12.1563 1 12.4315 1.12527 12.6214 1.34348L16.7543 6.09195C16.9127 6.27398 17 6.50715 17 6.74847V18C17 18.5523 16.5523 19 16 19Z"
- Stroke="#273C62"
- StrokeThickness="2" />
- <Path Data="M8 2H6V4H8V6H6V8H8V10H6V12V15C6 15.5523 6.44772 16 7 16H9C9.55228 16 10 15.5523 10 15V12H8V10H10V8H8V6H10V4H8V2Z" Fill="#94989C" />
- </Grid>
- </StackPanel>
- <TextBlock VerticalAlignment="Center" Text="压缩" />
- </StackPanel>
- </Button>
- <Button Command="{Binding MergeCommand}" Style="{StaticResource InsideBarBtnStyle}">
- <StackPanel Margin="4,0,4,0" Orientation="Horizontal">
- <StackPanel Margin="0,0,4,0">
- <Grid>
- <Path Data="M2 2C0.89543 2 0 2.89543 0 4V16C0 17.1046 0.89543 18 2 18H7C8.10457 18 9 17.1046 9 16V13.5H7V16H2V4L7 4V6.5H9V4C9 2.89543 8.10457 2 7 2H2ZM13 2C11.8954 2 11 2.89543 11 4V6.5H13V4H18V16H13V13.5H11V16C11 17.1046 11.8954 18 13 18H18C19.1046 18 20 17.1046 20 16V4C20 2.89543 19.1046 2 18 2H13Z" Fill="#273C62" />
- <Path Data="M5.29295 7.87868L6.41427 9L3 9V11L6.41427 11L5.29295 12.1213L6.70716 13.5355L9.53559 10.7071L10 10.2427L10.4644 10.7071L13.2928 13.5355L14.707 12.1213L13.5857 11L17 11V9L13.5857 9L14.707 7.87868L13.2928 6.46446L10.4644 9.29289L10 9.7573L9.53559 9.29289L6.70716 6.46446L5.29295 7.87868Z" Fill="#94989C" />
- </Grid>
- </StackPanel>
- <TextBlock VerticalAlignment="Center" Text="合并" />
- </StackPanel>
- </Button>
- <Button
- Name="SecurityButtonMore"
- Click="SecurityButtonMore_Click"
- Initialized="SecurityButtonMore_Initialized"
- IsEnabled="{Binding ElementName=SecurityMenuMore, Path=IsOpen, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource InsideBarBtnStyle}">
- <StackPanel Orientation="Horizontal">
- <StackPanel Margin="4,0,4,0">
- <Grid>
- <Path
- Data="M2.50001 3.22655L2.50001 2.79201L10 1.02731L17.5 2.79201V2.80177V2.81579V2.82991V2.84413V2.85846V2.8729V2.88745V2.90209V2.91685V2.93171V2.94667V2.96173V2.9769V2.99217V3.00755V3.02302V3.0386V3.05428V3.07006V3.08594V3.10192V3.118V3.13418V3.15046V3.16683V3.18331V3.19988V3.21655V3.23332V3.25018V3.26714V3.2842V3.30135V3.3186V3.33594V3.35338V3.37091V3.38853V3.40625V3.42406V3.44196V3.45996V3.47805V3.49623V3.51449V3.53285V3.55131V3.56985V3.58848V3.60719V3.626V3.6449V3.66388V3.68295V3.70211V3.72136V3.74069V3.76011V3.77961V3.7992V3.81887V3.83863V3.85848V3.8784V3.89841V3.9185V3.93868V3.95894V3.97928V3.9997V4.0202V4.04079V4.06145V4.08219V4.10302V4.12392V4.1449V4.16596V4.1871V4.20831V4.22961V4.25098V4.27242V4.29395V4.31554V4.33722V4.35897V4.38079V4.40269V4.42466V4.44671V4.46882V4.49102V4.51328V4.53562V4.55802V4.5805V4.60305V4.62567V4.64836V4.67112V4.69395V4.71685V4.73982V4.76285V4.78595V4.80912V4.83236V4.85567V4.87904V4.90247V4.92597V4.94954V4.97317V4.99687V5.02063V5.04445V5.06834V5.09229V5.1163V5.14038V5.16452V5.18871V5.21297V5.23729V5.26167V5.28611V5.31061V5.33517V5.35979V5.38446V5.40919V5.43399V5.45883V5.48374V5.5087V5.53372V5.55879V5.58392V5.6091V5.63434V5.65963V5.68498V5.71038V5.73583V5.76133V5.78689V5.8125V5.83816V5.86387V5.88963V5.91545V5.94131V5.96722V5.99318V6.01919V6.04525V6.07136V6.09751V6.12372V6.14996V6.17626V6.2026V6.22899V6.25542V6.2819V6.30842V6.33499V6.3616V6.38825V6.41495V6.44169V6.46847V6.4953V6.52216V6.54907V6.57602V6.60301V6.63004V6.6571V6.68421V6.71136V6.73854V6.76577V6.79303V6.82033V6.84766V6.87504V6.90244V6.92989V6.95737V6.98489V7.01244V7.04002V7.06764V7.09529V7.12298V7.15069V7.17845V7.20623V7.23404V7.26189V7.28977V7.31767V7.34561V7.37358V7.40158V7.4296V7.45766V7.48574V7.51385V7.54199V7.57016V7.59835V7.62657V7.65482V7.68309V7.71138V7.7397V7.76805V7.79642V7.82481V7.85323V7.88167V7.91013V7.93862V7.96712V7.99565V8.0242V8.05277V8.08136V8.10997V8.1386V8.16725V8.19592V8.2246V8.25331V8.28203V8.31077V8.33953V8.3683V8.39709V8.42589V8.45471V8.48355V8.5124V8.54126V8.57014V8.59903V8.62793V8.65685V8.68578V8.71472V8.74368V8.77264V8.80162V8.8306V8.8596V8.8886V8.91762V8.94664V8.97567V9.00471V9.03376V9.06282V9.09188V9.12095V9.15003V9.17911V9.20819V9.23729V9.26638V9.29549V9.32459V9.3537V9.38281V9.41193V9.44104V9.47017V9.49929V9.52841V9.55753V9.58666V9.61578V9.64491V9.67403V9.70315V9.73227V9.76139V9.79051V9.81963V9.84874V9.87785V9.90695V9.93606V9.96515V9.99425V10.0233V10.0524V10.0815V10.1106V10.1396V10.1687V10.1977V10.2268V10.2558V10.2848V10.3138V10.3428V10.3718V10.4008V10.4298V10.4588V10.4877V10.5167V10.5456V10.5745V10.6034V10.6323V10.6612V10.6901V10.7189V10.7477V10.7766V10.8054V10.8342V10.8629V10.8917V10.9204V10.9492V10.9779V11.0065V11.0352V11.0639V11.0925V11.1211V11.1497V11.1783V11.2068V11.2354V11.2639V11.2923V11.3208V11.3493V11.3777V11.4061V11.4344V11.4628V11.4911V11.5194V11.5477V11.5759V11.6041V11.6323V11.6605V11.6886V11.7168V11.7448V11.7729V11.8009V11.8289V11.8569V11.8848V11.9127V11.9406V11.9685V11.9963V12.0241V12.0518V12.0795V12.1072V12.1349V12.1625V12.1901V12.2176V12.2452V12.2726V12.3001V12.3275V12.3549V12.3822V12.4095V12.4368V12.464V12.4912V12.5183V12.5455V12.5725V12.5996V12.6265V12.6535V12.6804V12.7073V12.7341V12.7609V12.7876V12.8143V12.841V12.8676V12.8942V12.9207V12.9472V12.9736V13C17.5 13.5369 17.1807 14.1959 16.451 14.955C15.7396 15.695 14.7594 16.4028 13.7312 17.0267C12.7108 17.6459 11.684 18.1581 10.9085 18.5167C10.5349 18.6894 10.2222 18.8253 10 18.9191C9.77783 18.8253 9.46513 18.6894 9.09151 18.5167C8.31597 18.1581 7.28917 17.6459 6.26873 17.0267C5.24056 16.4028 4.26037 15.695 3.549 14.955C2.81927 14.1959 2.49998 13.5369 2.5 13L2.50004 6.18749L2.50001 3.22655Z"
- Stroke="#273C62"
- StrokeThickness="2" />
- <Path Data="M9 10V13H11V10H14V8H11V5H9V8H6V10H9Z" Fill="#94989C" />
- </Grid>
- </StackPanel>
- <TextBlock VerticalAlignment="Center" Text="安全" />
- <Path
- Width="12"
- Height="12"
- Margin="4,0"
- Data="M6.5 10L11.5 4H1.5L6.5 10Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </StackPanel>
- <Button.ContextMenu>
- <ContextMenu Name="SecurityMenuMore" Placement="Bottom">
- <MenuItem Command="{Binding SetPasswordCommand}" Header="{Binding T_SetPassWord}" />
- <MenuItem Command="{Binding CancelPasswordCommand}" Header="{Binding T_RemovePassword}" />
- </ContextMenu>
- </Button.ContextMenu>
- </Button>
- <Button Style="{StaticResource InsideBarBtnStyle}" Visibility="Collapsed">
- <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
- <StackPanel Margin="0,0,8,0">
- <Border
- Width="30"
- Height="30"
- Background="LightSeaGreen" />
- </StackPanel>
- <TextBlock VerticalAlignment="Center" Text="文件对比" />
- </StackPanel>
- </Button>
- <Rectangle
- Width="1"
- Height="16"
- Margin="12,0,12,0"
- Fill="{StaticResource color.sys.layout.divider}" />
- <Button
- Name="RedactionContent"
- Command="{Binding SetEditToolsCommand}"
- CommandParameter="{Binding ElementName=RedactionContent}"
- Style="{StaticResource InsideBarBtnStyle}"
- Visibility="Collapsed">
- <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
- <StackPanel Margin="0,0,8,0">
- <Border
- Width="30"
- Height="30"
- Background="LightSeaGreen" />
- </StackPanel>
- <TextBlock VerticalAlignment="Center" Text="密文" />
- <Path
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Data="M0 0L4 4L8 0H0Z"
- Fill="Black">
- <Path.RenderTransform>
- <TranslateTransform X="8" />
- </Path.RenderTransform>
- </Path>
- </StackPanel>
- </Button>
- <Button
- x:Name="WatermarkContent"
- Command="{Binding SetEditToolsCommand}"
- CommandParameter="{Binding ElementName=WatermarkContent}"
- Style="{StaticResource InsideBarBtnStyle}"
- Visibility="Collapsed">
- <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
- <StackPanel Margin="0,0,8,0">
- <Border
- Width="30"
- Height="30"
- Background="LightSeaGreen" />
- </StackPanel>
- <TextBlock VerticalAlignment="Center" Text="水印" />
- <Path
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Data="M0 0L4 4L8 0H0Z"
- Fill="Black">
- <Path.RenderTransform>
- <TranslateTransform X="8" />
- </Path.RenderTransform>
- </Path>
- </StackPanel>
- </Button>
- <Button
- Name="BackgroundContent"
- Command="{Binding SetEditToolsCommand}"
- CommandParameter="{Binding ElementName=BackgroundContent}"
- Style="{StaticResource InsideBarBtnStyle}"
- Visibility="Collapsed">
- <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
- <StackPanel Margin="0,0,8,0">
- <Border
- Width="30"
- Height="30"
- Background="LightSeaGreen" />
- </StackPanel>
- <TextBlock VerticalAlignment="Center" Text="背景" />
- <Path
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Data="M0 0L4 4L8 0H0Z"
- Fill="Black">
- <Path.RenderTransform>
- <TranslateTransform X="8" />
- </Path.RenderTransform>
- </Path>
- </StackPanel>
- </Button>
- <Button
- Name="HeaderFooterContent"
- Command="{Binding SetEditToolsCommand}"
- CommandParameter="{Binding ElementName=HeaderFooterContent}"
- Style="{StaticResource InsideBarBtnStyle}"
- Visibility="Collapsed">
- <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
- <StackPanel Margin="0,0,8,0">
- <Border
- Width="30"
- Height="30"
- Background="LightSeaGreen" />
- </StackPanel>
- <TextBlock VerticalAlignment="Center" Text="页眉页脚" />
- <Path
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Data="M0 0L4 4L8 0H0Z"
- Fill="Black">
- <Path.RenderTransform>
- <TranslateTransform X="8" />
- </Path.RenderTransform>
- </Path>
- </StackPanel>
- </Button>
- <Button
- Name="BatesContent"
- Command="{Binding SetEditToolsCommand}"
- CommandParameter="{Binding ElementName=BatesContent}"
- Style="{StaticResource InsideBarBtnStyle}"
- Visibility="Collapsed">
- <StackPanel Margin="12,0,12,0" Orientation="Horizontal">
- <StackPanel Margin="0,0,8,0">
- <Border
- Width="30"
- Height="30"
- Background="LightSeaGreen" />
- </StackPanel>
- <TextBlock VerticalAlignment="Center" Text="贝茨码" />
- <Path
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Data="M0 0L4 4L8 0H0Z"
- Fill="Black">
- <Path.RenderTransform>
- <TranslateTransform X="8" />
- </Path.RenderTransform>
- </Path>
- </StackPanel>
- </Button>
- <Button
- Name="CropPageMenuMore"
- Click="CropPageMore_Click"
- Initialized="CropPageMore_Initialized"
- IsEnabled="{Binding ElementName=SecurityMenuMore, Path=IsOpen, Converter={StaticResource InvertBoolConvert}}"
- Style="{StaticResource InsideBarBtnStyle}"
- Visibility="Visible">
- <StackPanel Margin="4,0,4,0" Orientation="Horizontal">
- <Path Data="M13 16L5 16C4.44771 16 4 15.5523 4 15V7L4 2V0H2L2 2H0V4H2L2 15C2 16.6569 3.34315 18 5 18L16 18V20H18V18H20V16H18H16H13ZM16 14V5C16 4.44771 15.5523 4 15 4H6V2H15C16.6569 2 18 3.34315 18 5V14H16Z" Fill="#273C62" />
- <TextBlock VerticalAlignment="Center" Text="裁剪" />
- <Path
- Width="12"
- Height="12"
- Margin="4,0"
- Data="M6.5 10L11.5 4H1.5L6.5 10Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </StackPanel>
- <Button.ContextMenu>
- <ContextMenu Name="CropPageMenu" Placement="Bottom">
- <MenuItem Command="{Binding CropCurrentPageWMCommand}" Header="Crop Current Page - White Margins" />
- <MenuItem Command="{Binding CropAllPagesWMCommand}" Header="Crop All Pages - White Margins" />
- </ContextMenu>
- </Button.ContextMenu>
- </Button>
- </StackPanel>
- </Grid>
- </Grid>
- </Border>
- </UserControl>
|