HomePagePictureToPDFDialog.xaml 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. <UserControl
  2. x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePictureToPDFDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:convert="clr-namespace:PDF_Office.DataConvert"
  6. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:homepagetoolsdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.HomePageToolsDialogs"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:prism="http://prismlibrary.com/"
  11. x:Name="userControl"
  12. d:DataContext="{d:DesignInstance Type=homepagetoolsdialogs:HomePagePictureToPDFDialogViewModel}"
  13. prism:Dialog.WindowStyle="{StaticResource stlWindowEx}"
  14. d:DesignHeight="640"
  15. d:DesignWidth="1024"
  16. prism:ViewModelLocator.AutoWireViewModel="True"
  17. mc:Ignorable="d">
  18. <UserControl.Resources>
  19. <ResourceDictionary>
  20. <ResourceDictionary.MergedDictionaries>
  21. <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ListViewStyle.xaml" />
  22. </ResourceDictionary.MergedDictionaries>
  23. <Style x:Key="ImageFilesListViewStyle" TargetType="{x:Type ListView}">
  24. <Setter Property="Template">
  25. <Setter.Value>
  26. <ControlTemplate TargetType="{x:Type ListView}">
  27. <Border
  28. x:Name="Bd"
  29. Padding="1"
  30. Background="{TemplateBinding Background}"
  31. BorderBrush="{TemplateBinding BorderBrush}"
  32. BorderThickness="{TemplateBinding BorderThickness}"
  33. SnapsToDevicePixels="true">
  34. <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false">
  35. <Grid>
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="Auto" />
  38. <RowDefinition />
  39. </Grid.RowDefinitions>
  40. <Grid>
  41. <Grid.ColumnDefinitions>
  42. <ColumnDefinition Width="4.5*" MinWidth="0" />
  43. <ColumnDefinition Width="3*" />
  44. <ColumnDefinition Width="2*" />
  45. <ColumnDefinition Width="100" />
  46. </Grid.ColumnDefinitions>
  47. <!-- 以下是列表模式的列标题 -->
  48. <TextBlock
  49. Margin="12,0,0,6"
  50. HorizontalAlignment="Left"
  51. VerticalAlignment="Center"
  52. FontSize="14" />
  53. <TextBlock
  54. Grid.Column="1"
  55. Margin="0,0,0,6"
  56. HorizontalAlignment="Center"
  57. VerticalAlignment="Center"
  58. FontSize="14"
  59. TextAlignment="Center"
  60. TextWrapping="Wrap" />
  61. <TextBlock
  62. Grid.Column="2"
  63. Margin="0,0,0,6"
  64. HorizontalAlignment="Center"
  65. VerticalAlignment="Center"
  66. FontSize="14" />
  67. <!-- 列表模式的列标题的分隔线 -->
  68. <Rectangle
  69. Grid.ColumnSpan="4"
  70. Height="0"
  71. Margin="12,0,0,0"
  72. HorizontalAlignment="Stretch"
  73. VerticalAlignment="Bottom"
  74. Fill="#26000000" />
  75. </Grid>
  76. <ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  77. </Grid>
  78. </ScrollViewer>
  79. </Border>
  80. </ControlTemplate>
  81. </Setter.Value>
  82. </Setter>
  83. </Style>
  84. <Style x:Key="HeadStyle" TargetType="{x:Type GridViewColumnHeader}">
  85. <Setter Property="OverridesDefaultStyle" Value="False" />
  86. <Setter Property="VerticalAlignment" Value="Center" />
  87. <Setter Property="HorizontalContentAlignment" Value="Left" />
  88. <Setter Property="Height" Value=" 32" />
  89. <Setter Property="TextBlock.FontFamily" Value="Segoe UI" />
  90. <Setter Property="Template">
  91. <Setter.Value>
  92. <ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
  93. <Grid
  94. Name="g"
  95. Width="{TemplateBinding Width}"
  96. Background="#FFFFFF">
  97. <Border Name="bd" Padding="{TemplateBinding Padding}" BorderThickness="0,0,0,1" BorderBrush="{StaticResource color.item-state.sel.border.lv3}">
  98. <ContentPresenter Margin="5,4,1,3" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
  99. </Border>
  100. </Grid>
  101. </ControlTemplate>
  102. </Setter.Value>
  103. </Setter>
  104. </Style>
  105. <!-- ListViewItem的样式 -->
  106. <Style x:Key="listitem1" TargetType="{x:Type ListViewItem}">
  107. <Style.Setters>
  108. <Setter Property="SnapsToDevicePixels" Value="True" />
  109. <Setter Property="Template">
  110. <Setter.Value>
  111. <ControlTemplate TargetType="{x:Type ListViewItem}">
  112. <Border
  113. Name="Bd"
  114. Margin="2"
  115. Padding="{TemplateBinding Control.Padding}"
  116. Background="{TemplateBinding Panel.Background}"
  117. BorderBrush="{TemplateBinding BorderBrush}"
  118. BorderThickness="{TemplateBinding BorderThickness}"
  119. CornerRadius="4"
  120. SnapsToDevicePixels="True">
  121. <GridViewRowPresenter
  122. Margin="3"
  123. HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
  124. VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
  125. SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
  126. </Border>
  127. <ControlTemplate.Triggers>
  128. <Trigger Property="IsSelected" Value="True">
  129. <!--<Trigger.Setters>
  130. <Setter TargetName="Bd" Property="Background">
  131. <Setter.Value>
  132. <LinearGradientBrush StartPoint="0.5,0.22" EndPoint="0.5,1">
  133. <GradientStop Offset="0.31" Color="LightGray" />
  134. <GradientStop Offset="0.88" Color="Gray" />
  135. </LinearGradientBrush>
  136. </Setter.Value>
  137. </Setter>
  138. </Trigger.Setters>-->
  139. </Trigger>
  140. </ControlTemplate.Triggers>
  141. </ControlTemplate>
  142. </Setter.Value>
  143. </Setter>
  144. </Style.Setters>
  145. </Style>
  146. <convert:UnVisivleConvert x:Key="unVisibleConvert" />
  147. <convert:UnVisivleConvert x:Key="UnvisibleConvert" />
  148. </ResourceDictionary>
  149. </UserControl.Resources>
  150. <Grid >
  151. <Grid.RowDefinitions>
  152. <RowDefinition Height="40" />
  153. <RowDefinition Height="*" />
  154. </Grid.RowDefinitions>
  155. <Grid Background="{StaticResource color.sys.layout.bg.tabbar}" >
  156. <TextBlock Text="Image to PDF" Foreground="{StaticResource color.sys.text.neutral.lv1}" FontSize="16" FontFamily="Segoe UI" VerticalAlignment="Center" FontWeight="DemiBold" Margin="16,8,0,8" HorizontalAlignment="Left"></TextBlock>
  157. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" WindowChrome.IsHitTestVisibleInChrome="True">
  158. <Button
  159. Name="BtnMiniSize"
  160. Width="40"
  161. Height="40"
  162. Background="Transparent"
  163. BorderThickness="0"
  164. Click="BtnMiniSize_Click"
  165. Style="{StaticResource TitleBarBtn}">
  166. <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 7 14 8 2 8 2 7">
  167. <Polygon.RenderTransform>
  168. <TransformGroup>
  169. <TranslateTransform Y="-3" />
  170. </TransformGroup>
  171. </Polygon.RenderTransform>
  172. </Polygon>
  173. </Button>
  174. <Button
  175. Name="BtnReStore"
  176. Width="40"
  177. Height="40"
  178. Background="Transparent"
  179. BorderThickness="0"
  180. Click="BtnReStore_Click"
  181. Style="{StaticResource TitleBarBtn}">
  182. <Grid>
  183. <Path
  184. x:Name="ico_max"
  185. Data="M14,2 L14,14 L2,14 L2,2 L14,2 Z M13,3 L3,3 L3,13 L13,13 L13,3 Z"
  186. Fill="{StaticResource color.btn.sec.text.def}"
  187. Visibility="Collapsed" />
  188. <Grid x:Name="ico_mini" Visibility="{Binding ElementName=ico_max, Path=Visibility, Converter={StaticResource UnvisibleConvert}}">
  189. <Path Data="M11,5 L11,14 L2,14 L2,5 L11,5 Z M10,6 L3,6 L3,13 L10,13 L10,6 Z" Fill="{StaticResource color.btn.sec.text.def}" />
  190. <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="14 2 14 11 11 11 11 10 13 10 13 3 6 3 6 5 5 5 5 2" />
  191. </Grid>
  192. </Grid>
  193. </Button>
  194. <Button
  195. Name="BtnClose"
  196. Width="40"
  197. Height="40"
  198. Background="Transparent"
  199. BorderThickness="0"
  200. Click="BtnClose_Click"
  201. Style="{StaticResource CloseBtn}">
  202. <Polygon Fill="{StaticResource color.btn.sec.text.def}" Points="11.2919922 12 12 11.2919922 6.70800781 6 12 0.708007813 11.2919922 0 6 5.29199219 0.708007812 9.76996262e-15 -2.27456942e-13 0.708007813 5.29199219 6 0 11.2919922 0.708007812 12 6 6.70800781" />
  203. </Button>
  204. </StackPanel>
  205. </Grid>
  206. <Grid IsEnabled="{Binding PictureToPDFGridIsEnabled}" Grid.Row="1" Background="{StaticResource color.sys.layout.anti}">
  207. <Grid.ColumnDefinitions>
  208. <ColumnDefinition Width="764*" />
  209. <ColumnDefinition Width="260" />
  210. </Grid.ColumnDefinitions>
  211. <Grid Grid.Column="0">
  212. <Grid.RowDefinitions>
  213. <RowDefinition Height="*" />
  214. <RowDefinition Height="72" />
  215. </Grid.RowDefinitions>
  216. <Grid
  217. Grid.Row="0"
  218. x:Name="grid"
  219. AllowDrop="True"
  220. DragEnter="MainPage_DragEnter"
  221. DragLeave="MainPage_DragLeave"
  222. DragOver="MainPage_DragOver"
  223. Drop="Grid_Drop">
  224. <!--<Label Name="DropGrid" Background="#18A0FB" Opacity="0.5" Panel.ZIndex="1" Visibility="Collapsed"/>-->
  225. <Grid
  226. Width="732"
  227. Height="600"
  228. Visibility="{Binding AddFileVisibility}">
  229. <Button
  230. Name="BtnBlank"
  231. Width="418"
  232. Height="180"
  233. Style="{StaticResource btn.sec}"
  234. Command="{Binding ADDPictureCommand}"
  235. BorderBrush="#FFFFFFFF"
  236. Visibility="{Binding AddFileVisibility}">
  237. <StackPanel>
  238. <Grid Width="128" Height="128">
  239. <Path
  240. Data="M19.5 43.7691C19.5 42.7996 20.286 42.0137 21.2555 42.0137H40.478C40.8527 42.0137 41.2176 42.1336 41.5193 42.3559L50.4493 48.9359C51.2666 49.5381 52.2551 49.8629 53.2702 49.8629H93.2372C94.2067 49.8629 94.9927 50.6489 94.9927 51.6184V95.5671C94.9927 96.5366 94.2067 97.3225 93.2372 97.3225H21.2555C20.286 97.3225 19.5 96.5366 19.5 95.5671V43.7691Z"
  241. Stroke="#CED0D4"
  242. StrokeThickness="3" />
  243. <Path
  244. Data="M27 41.3125V37.2555C27 35.4575 28.4575 34 30.2555 34H49.478C50.1729 34 50.8496 34.2224 51.4091 34.6346L60.3391 41.2146C60.8986 41.6269 61.5753 41.8493 62.2702 41.8493H100.237C102.035 41.8493 103.493 43.3068 103.493 45.1047V91C103.493 94.3137 100.806 97 97.4927 97H91.6811"
  245. Stroke="#CED0D4"
  246. StrokeThickness="3" />
  247. </Grid>
  248. <TextBlock
  249. Margin="0,8,0,0"
  250. HorizontalAlignment="Center"
  251. FontSize="14"
  252. Style="{StaticResource PropertyHeaderLv2}"
  253. Text="No Files" />
  254. <TextBlock
  255. Width="418"
  256. Height="20"
  257. Margin="0,2,0,0"
  258. FontSize="12"
  259. Style="{StaticResource PropertyHeaderLv2}"
  260. Text="Click the button below to select the file."
  261. TextAlignment="Center"
  262. TextBlock.Foreground="{StaticResource color.sys.text.neutral.lv3}" />
  263. </StackPanel>
  264. </Button>
  265. </Grid>
  266. <Grid Width="{Binding ActualWidth, ElementName=grid, Mode=OneWay}"
  267. Height="{Binding ActualHeight, ElementName=grid, Mode=OneWay}" >
  268. <Grid Width="{Binding ActualWidth, ElementName=grid, Mode=OneWay}" Visibility="Hidden">
  269. <Grid.ColumnDefinitions>
  270. <ColumnDefinition Width="16" />
  271. <ColumnDefinition Width="*" />
  272. <ColumnDefinition Width="16" />
  273. </Grid.ColumnDefinitions>
  274. <Grid Grid.Column="1" x:Name="col4" />
  275. </Grid>
  276. <Grid x:Name="gridContainer" Width="{Binding ElementName=col4, Path=ActualWidth}" Visibility="Hidden">
  277. <Grid.ColumnDefinitions>
  278. <ColumnDefinition Width="16"/>
  279. <ColumnDefinition Width="588*" />
  280. <ColumnDefinition Width="68*" />
  281. <ColumnDefinition Width="88*"/>
  282. </Grid.ColumnDefinitions>
  283. <Grid Grid.Column="1" x:Name="col1" />
  284. <Grid Grid.Column="2" x:Name="col2"/>
  285. <Grid Grid.Column="3" x:Name="col3" />
  286. </Grid>
  287. <ListView
  288. Width="{Binding ElementName=col4, Path=ActualWidth}"
  289. HorizontalAlignment="Center"
  290. x:Name="listView"
  291. Background="White"
  292. BorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  293. BorderThickness="0,0,0,0"
  294. DataContext="{Binding ImagesDataTable}"
  295. ItemsSource="{Binding}"
  296. SelectionChanged="listView_SelectionChanged"
  297. Visibility="{Binding ElementName=BtnBlank, Path=Visibility, Converter={StaticResource unVisibleConvert}}">
  298. <ListView.ContextMenu>
  299. <ContextMenu StaysOpen="True">
  300. <MenuItem
  301. Name="OpenFileMenuItem"
  302. Click="OpenFileMenuItem_Click"
  303. Header="打开文件" />
  304. <MenuItem
  305. Name="RemoveFileMenuItem"
  306. Click="RemoveFileMenuItem_Click"
  307. Header="移除" />
  308. </ContextMenu>
  309. </ListView.ContextMenu>
  310. <ListView.View>
  311. <GridView ColumnHeaderContainerStyle="{StaticResource HeadStyle}">
  312. <GridViewColumn Width="{Binding ElementName=col1, Path=ActualWidth}" Header="文档名">
  313. <GridViewColumn.CellTemplate>
  314. <DataTemplate>
  315. <StackPanel Orientation="Horizontal">
  316. <Label VerticalAlignment="Center">
  317. <Grid>
  318. <Rectangle
  319. Width="16"
  320. Height="16"
  321. Fill="#617CA1"
  322. RadiusX="2"
  323. RadiusY="2" />
  324. <Path Data="M1.59814 10.3584H2.63037V5.42627H1.59814V10.3584Z" Fill="white" />
  325. <Path Data="M3.82666 10.3584H4.74609V7.00195H4.81445L6.0791 10.3584H6.7251L7.98975 7.00195H8.05811V10.3584H8.97754V5.42627H7.79492L6.43457 9.03564H6.37305L5.00928 5.42627H3.82666V10.3584Z" Fill="white" />
  326. <Path Data="M12.3237 10.4849C13.6704 10.4849 14.5112 9.66455 14.5112 8.35547V7.72998H12.4399V8.48193H13.5063L13.5029 8.57422C13.4824 9.19629 13.0176 9.60986 12.3408 9.60986C11.5273 9.60986 11.0112 8.9502 11.0112 7.88037V7.87354C11.0112 6.82422 11.5034 6.1748 12.2998 6.1748C12.8774 6.1748 13.2979 6.46533 13.438 6.9541L13.4448 6.98828H14.4702L14.4634 6.9541C14.3164 5.96973 13.4653 5.2998 12.2998 5.2998C10.8643 5.2998 9.9585 6.30127 9.9585 7.88379V7.89062C9.9585 9.49707 10.8574 10.4849 12.3237 10.4849Z" Fill="white" />
  327. </Grid>
  328. </Label>
  329. <TextBlock
  330. Margin="8,0,0,0"
  331. HorizontalAlignment="Left"
  332. VerticalAlignment="Center"
  333. Text="{Binding FileName}" />
  334. </StackPanel>
  335. </DataTemplate>
  336. </GridViewColumn.CellTemplate>
  337. </GridViewColumn>
  338. <GridViewColumn DisplayMemberBinding="{Binding FileSize}" Width="{Binding ElementName=col2, Path=ActualWidth}" Header="大小" />
  339. <GridViewColumn Header="状态" Width="{Binding ElementName=col3, Path=ActualWidth}">
  340. <GridViewColumn.CellTemplate>
  341. <DataTemplate>
  342. <StackPanel Orientation="Horizontal">
  343. <cus:BatchStatus
  344. Width="16"
  345. Height="16"
  346. MaxStatusValue="{Binding MaxPageRange, Mode=TwoWay}"
  347. StatusValue="{Binding FileState, Mode=TwoWay}" />
  348. <Button
  349. Name="DeleteTemplateBtn"
  350. Width="18"
  351. Height="18"
  352. Margin="32,0,0,0"
  353. Background="Transparent"
  354. BorderBrush="Transparent"
  355. Click="DeleteTemplateBtn_Click"
  356. Style="{StaticResource btn.sec}">
  357. <Grid Width="14" Height="14">
  358. <Path
  359. Data="M7 14C10.866 14 14 10.866 14 7C14 3.13401 10.866 0 7 0C3.13401 0 0 3.13401 0 7C0 10.866 3.13401 14 7 14ZM10.5303 4.53038L8.06069 7L10.5303 9.46962L9.46967 10.5303L7.00002 8.06066L4.53033 10.5303L3.46967 9.46967L5.93936 7L3.46967 4.53033L4.53033 3.46967L7.00002 5.93934L9.46967 3.46971L10.5303 4.53038Z"
  360. Fill="#CED0D4"
  361. Stretch="Fill" />
  362. </Grid>
  363. </Button>
  364. </StackPanel>
  365. <DataTemplate.Triggers>
  366. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="True">
  367. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Visible" />
  368. </DataTrigger>
  369. <DataTrigger Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType=ListViewItem}}" Value="False">
  370. <Setter TargetName="DeleteTemplateBtn" Property="Visibility" Value="Hidden" />
  371. </DataTrigger>
  372. </DataTemplate.Triggers>
  373. </DataTemplate>
  374. </GridViewColumn.CellTemplate>
  375. </GridViewColumn>
  376. </GridView>
  377. </ListView.View>
  378. <ListView.ItemContainerStyle>
  379. <Style BasedOn="{StaticResource listitem1}" TargetType="ListViewItem">
  380. <Setter Property="Height" Value="42" />
  381. <Setter Property="Margin" Value="0,0,0,0" />
  382. <Setter Property="BorderThickness" Value="0,0,0,1" />
  383. <Setter Property="TextBlock.Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
  384. <Setter Property="TextBlock.FontFamily" Value="Segoe UI" />
  385. <Setter Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  386. <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  387. <Setter Property="Padding" Value="0,0,0,0" />
  388. <Style.Triggers>
  389. <Trigger Property="IsMouseOver" Value="True">
  390. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  391. <Setter Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  392. <Setter Property="BorderThickness" Value="2,2,2,2" />
  393. </Trigger>
  394. <Trigger Property="IsSelected" Value="True">
  395. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  396. <Setter Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
  397. <Setter Property="BorderThickness" Value="2,2,2,2" />
  398. </Trigger>
  399. <Trigger Property="ListView.AlternationIndex" Value="1">
  400. <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
  401. </Trigger>
  402. </Style.Triggers>
  403. </Style>
  404. </ListView.ItemContainerStyle>
  405. </ListView>
  406. </Grid>
  407. </Grid>
  408. <Grid Grid.Row="1">
  409. <Button
  410. x:Name="MenuBtn"
  411. Width="113"
  412. Height="32"
  413. Margin="25,0,0,0"
  414. HorizontalAlignment="Left"
  415. Click="Menu_Click"
  416. Style="{StaticResource btn.sec}">
  417. <StackPanel Orientation="Horizontal">
  418. <Border HorizontalAlignment="Right">
  419. <TextBlock
  420. Width="57"
  421. Height="22"
  422. FontSize="14"
  423. Foreground="Black"
  424. Text="Add Files" />
  425. </Border>
  426. <Border
  427. Width="12"
  428. Height="7"
  429. Margin="12,0,0,0">
  430. <Path
  431. HorizontalAlignment="Right"
  432. VerticalAlignment="Center"
  433. Data="M6 4.80726L1.26513 0L0 1.28448L5.36743 6.73398C5.71679 7.08868 6.28321 7.08868 6.63257 6.73398L12 1.28448L10.7349 0L6 4.80726Z"
  434. Fill="#94989C"
  435. Stretch="Fill" />
  436. </Border>
  437. </StackPanel>
  438. </Button>
  439. <Popup
  440. x:Name="menuPop1"
  441. AllowsTransparency="True"
  442. PlacementTarget="{Binding ElementName=MenuBtn}"
  443. StaysOpen="False">
  444. <Grid
  445. Width="auto"
  446. Height="auto"
  447. HorizontalAlignment="Left">
  448. <Border
  449. Margin="3"
  450. Background="White"
  451. BorderThickness="0"
  452. CornerRadius="3">
  453. <Border.Effect>
  454. <DropShadowEffect ShadowDepth="0" Color="#FFB6B6B6" />
  455. </Border.Effect>
  456. <StackPanel Margin="0">
  457. <MenuItem
  458. x:Name="添加文件"
  459. Command="{Binding ADDPictureCommand}"
  460. Header="添加文件" />
  461. <MenuItem
  462. x:Name="添加文件夹"
  463. Command="{Binding ADDPictureFilesCommand}"
  464. Header="添加文件夹" />
  465. </StackPanel>
  466. </Border>
  467. </Grid>
  468. </Popup>
  469. <!--<Button
  470. Width="40"
  471. Height="40"
  472. Margin="0,0,90,0"
  473. HorizontalAlignment="Right">
  474. </Button>-->
  475. <Button
  476. Width="32"
  477. Height="32"
  478. Margin="25,0"
  479. HorizontalAlignment="Right"
  480. Command="{Binding RemovePictureFileCommand}"
  481. IsEnabled="{Binding RemoveIsEnable}"
  482. Style="{StaticResource btn.sec}">
  483. <Grid Width="16" Height="16">
  484. <Path Data="M6 1.75H10V0.25H6V1.75ZM1 4.25H2.25V15C2.25 15.4142 2.58579 15.75 3 15.75H13C13.4142 15.75 13.75 15.4142 13.75 15V4.25H15V2.75H1V4.25ZM3.75 14.25V4.25H12.25V14.25H3.75ZM7.25 6.5V11.5H8.75V6.5H7.25Z" Fill="#616469" />
  485. </Grid>
  486. </Button>
  487. </Grid>
  488. </Grid>
  489. <Grid
  490. Grid.Column="1"
  491. Background="WhiteSmoke"
  492. IsEnabled="{Binding SetPictureToPDFGridIsEnabled}">
  493. <Grid.RowDefinitions>
  494. <RowDefinition Height="1*" />
  495. <RowDefinition Height="64" />
  496. </Grid.RowDefinitions>
  497. <Grid Grid.Row="0" Margin="16,14,0,0">
  498. <StackPanel>
  499. <TextBlock Style="{StaticResource PagesView_titleContext}" Text="Setting" />
  500. <TextBlock
  501. Height="20"
  502. Margin="0,16,0,0"
  503. Style="{StaticResource PropertyHeaderLv2}"
  504. Text="Export" />
  505. <StackPanel Margin="0,8,0,0">
  506. <RadioButton
  507. Name="NewFilesRadioButtom"
  508. Padding="9,0,0,0"
  509. Click="RadioButton_Click"
  510. IsChecked="True"
  511. Style="{StaticResource RadioButtonStyleText}">
  512. <TextBlock Text="新建文档" />
  513. </RadioButton>
  514. <RadioButton
  515. Name="OneNewFileNameRadioButtom"
  516. Margin="0,8,0,0"
  517. Padding="9,0,0,0"
  518. Click="RadioButton_Click"
  519. Style="{StaticResource RadioButtonStyleText}">
  520. <TextBlock Text="合并为同一份PDF文档" />
  521. </RadioButton>
  522. <RadioButton
  523. Name="SelectFileNameRadioButton"
  524. Margin="0,8,0,0"
  525. Padding="9,0,0,0"
  526. Click="RadioButton_Click"
  527. Style="{StaticResource RadioButtonStyleText}"
  528. Visibility="Hidden">
  529. <TextBlock Text="插入现有PDF文档" />
  530. </RadioButton>
  531. </StackPanel>
  532. <StackPanel
  533. Margin="0,4,0,0"
  534. Orientation="Horizontal"
  535. Visibility="Hidden">
  536. <TextBox
  537. Width="190"
  538. Height="32"
  539. VerticalContentAlignment="Center"
  540. IsEnabled="False"
  541. Text="{Binding SelectFileName}" />
  542. <Button
  543. Width="32"
  544. Command="{Binding SelectFileCommand}"
  545. IsEnabled="{Binding ElementName=SelectFileNameRadioButton, Path=IsChecked}"
  546. Style="{StaticResource btn.sec}" />
  547. </StackPanel>
  548. </StackPanel>
  549. </Grid>
  550. <Grid
  551. Grid.Row="1"
  552. Margin="15,0,0,0"
  553. Visibility="Hidden">
  554. <StackPanel>
  555. <TextBlock Text="OCR" />
  556. <CheckBox Name="NeedOCRCheckBox" Margin="0,7,0,0">
  557. <TextBlock Text="在需要时识别文本" />
  558. </CheckBox>
  559. <ComboBox
  560. Width="228"
  561. Height="28.55"
  562. Margin="0,4,0,0"
  563. HorizontalAlignment="Left"
  564. IsEnabled="{Binding ElementName=NeedOCRCheckBox, Path=IsChecked}" />
  565. <CheckBox Margin="0,16,0,0" IsEnabled="{Binding ElementName=NeedOCRCheckBox, Path=IsChecked}">
  566. <TextBlock Text="识别为TXT" />
  567. </CheckBox>
  568. </StackPanel>
  569. </Grid>
  570. <Grid Grid.Row="1">
  571. <Button
  572. Width="228"
  573. Height="32"
  574. Command="{Binding ToPDFCommand}"
  575. IsEnabled="{Binding ImageToPDFBtnIsEnable}"
  576. Style="{StaticResource Btn.cta}">
  577. <TextBlock
  578. FontSize="18"
  579. Foreground="White"
  580. Text="导出文档" />
  581. </Button>
  582. </Grid>
  583. </Grid>
  584. </Grid>
  585. </Grid>
  586. </UserControl>