MergeDialog.xaml 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.ToolsDialogs.MergeDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:customcontrol="clr-namespace:PDF_Master.CustomControl"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:dataconvert="clr-namespace:PDF_Master.DataConvert"
  8. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:local="clr-namespace:PDF_Master.Views.Dialog.PageEditDialogs"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:prism="http://prismlibrary.com/"
  12. xmlns:toolsdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.ToolsDialogs"
  13. Width="818"
  14. Height="600"
  15. d:DataContext="{d:DesignInstance Type=toolsdialogs:MergeDialogViewModel}"
  16. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  17. Loaded="UserControl_Loaded"
  18. mc:Ignorable="d">
  19. <UserControl.Resources>
  20. <dataconvert:IndexConverter x:Key="IndexConverter" />
  21. <dataconvert:BoolToVisible x:Key="BoolToVisible" />
  22. <dataconvert:UnVisivleConvert x:Key="UnVisivleConvert" />
  23. <dataconvert:ListCountToVisible x:Key="ListCountToVisible" />
  24. <dataconvert:MergeListCountToBool x:Key="MergeListCountToBool" />
  25. <dataconvert:UnVisibleToBoolConvert x:Key="UnVisibleToBoolConvert" />
  26. <PathGeometry x:Key="Ic_ClearButtonPath" Figures="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" />
  27. <PathGeometry x:Key="Ic_DeleteButtonPath" Figures="M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.5303 5.53038L9.06069 8L11.5303 10.4696L10.4697 11.5303L8.00002 9.06066L5.53033 11.5303L4.46967 10.4697L6.93936 8L4.46967 5.53033L5.53033 4.46967L8.00002 6.93934L10.4697 4.46971L11.5303 5.53038Z" />
  28. <SolidColorBrush x:Key="Item.MouseOver.Background" Color="#1F26A0DA" />
  29. <SolidColorBrush x:Key="Item.MouseOver.Border" Color="#a826A0Da" />
  30. <SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#3DDADADA" />
  31. <SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="#FFDADADA" />
  32. <SolidColorBrush x:Key="Item.SelectedActive.Background" Color="#3D26A0DA" />
  33. <SolidColorBrush x:Key="Item.SelectedActive.Border" Color="#FF26A0DA" />
  34. <Style x:Key="ListViewItemStyle1" TargetType="{x:Type ListViewItem}">
  35. <Setter Property="SnapsToDevicePixels" Value="True" />
  36. <Setter Property="Padding" Value="0,2,0,0" />
  37. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  38. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
  39. <Setter Property="Background" Value="Transparent" />
  40. <Setter Property="BorderBrush" Value="Transparent" />
  41. <Setter Property="BorderThickness" Value="0" />
  42. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
  43. <Setter Property="Template">
  44. <Setter.Value>
  45. <ControlTemplate TargetType="{x:Type ListViewItem}">
  46. <Border
  47. x:Name="Bd"
  48. Grid.Row="2"
  49. Padding="{TemplateBinding Padding}"
  50. Background="{TemplateBinding Background}"
  51. BorderBrush="{TemplateBinding BorderBrush}"
  52. BorderThickness="{TemplateBinding BorderThickness}"
  53. CornerRadius="8"
  54. SnapsToDevicePixels="true">
  55. <ContentPresenter
  56. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  57. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  58. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  59. </Border>
  60. <ControlTemplate.Triggers>
  61. <MultiTrigger>
  62. <MultiTrigger.Conditions>
  63. <Condition Property="IsMouseOver" Value="True" />
  64. </MultiTrigger.Conditions>
  65. <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  66. <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.item-state.hov.bg}" />
  67. </MultiTrigger>
  68. <MultiTrigger>
  69. <MultiTrigger.Conditions>
  70. <Condition Property="Selector.IsSelectionActive" Value="False" />
  71. <Condition Property="IsSelected" Value="True" />
  72. </MultiTrigger.Conditions>
  73. <Setter TargetName="Bd" Property="Background" Value="{StaticResource Item.SelectedInactive.Background}" />
  74. <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Item.SelectedInactive.Border}" />
  75. </MultiTrigger>
  76. <MultiTrigger>
  77. <MultiTrigger.Conditions>
  78. <Condition Property="Selector.IsSelectionActive" Value="True" />
  79. <Condition Property="IsSelected" Value="True" />
  80. </MultiTrigger.Conditions>
  81. <Setter TargetName="Bd" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  82. <Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource color.item-state.hov.bg}" />
  83. </MultiTrigger>
  84. <Trigger Property="IsEnabled" Value="False">
  85. <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
  86. </Trigger>
  87. </ControlTemplate.Triggers>
  88. </ControlTemplate>
  89. </Setter.Value>
  90. </Setter>
  91. </Style>
  92. </UserControl.Resources>
  93. <Grid Background="{StaticResource color.sys.layout.anti}">
  94. <Grid.ColumnDefinitions>
  95. <ColumnDefinition Width="16" />
  96. <ColumnDefinition Width="*" />
  97. <ColumnDefinition Width="16" />
  98. <ColumnDefinition Width="0" />
  99. </Grid.ColumnDefinitions>
  100. <Grid.RowDefinitions>
  101. <RowDefinition Height="16" />
  102. <RowDefinition Height="20" />
  103. <RowDefinition Height="8" />
  104. <RowDefinition Height="*" />
  105. <RowDefinition Height="16" />
  106. <RowDefinition Height="50" />
  107. <RowDefinition Height="16" />
  108. </Grid.RowDefinitions>
  109. <Border
  110. Grid.Row="1"
  111. Grid.RowSpan="2"
  112. Grid.Column="1"
  113. Padding="50,6,50,6"
  114. Visibility="{Binding Visibility, Converter={StaticResource UnVisivleConvert}, ElementName=NoFileStackPanel}">
  115. <Grid>
  116. <Grid.ColumnDefinitions>
  117. <ColumnDefinition Width="429" />
  118. <ColumnDefinition Width="160" />
  119. <ColumnDefinition Width="*" />
  120. </Grid.ColumnDefinitions>
  121. <TextBlock
  122. x:Name="TitleFileName"
  123. FontFamily="Segoe UI"
  124. FontSize="12"
  125. FontWeight="Bold"
  126. Foreground="{StaticResource color.sys.text.neutral.lv1}" />
  127. <TextBlock
  128. x:Name="TitlePageRange"
  129. Grid.Column="1"
  130. FontFamily="Segoe UI"
  131. FontSize="12"
  132. FontWeight="Bold"
  133. Foreground="{StaticResource color.sys.text.neutral.lv1}" />
  134. <TextBlock
  135. x:Name="TitleSize"
  136. Grid.Column="2"
  137. HorizontalAlignment="Center"
  138. FontFamily="Segoe UI"
  139. FontSize="12"
  140. FontWeight="Bold"
  141. Foreground="{StaticResource color.sys.text.neutral.lv1}" />
  142. </Grid>
  143. </Border>
  144. <Border Grid.Row="3" Grid.Column="1">
  145. <Grid
  146. AllowDrop="True"
  147. Background="{StaticResource color.sys.layout.anti}"
  148. PreviewDragEnter="Grid_DragEnter"
  149. PreviewDragLeave="Grid_DragLeave"
  150. PreviewDragOver="Grid_DragOver"
  151. PreviewDrop="Grid_Drop">
  152. <StackPanel
  153. x:Name="NoFileStackPanel"
  154. HorizontalAlignment="Center"
  155. VerticalAlignment="Center"
  156. Visibility="{Binding MergeObjectlist.Count, Converter={StaticResource ListCountToVisible}}">
  157. <customcontrol:ImageButton
  158. Width="128"
  159. Height="128"
  160. Command="{Binding AddFilesCommand}"
  161. CommandParameter="0"
  162. Icon="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImage.png"
  163. IconHeight="128"
  164. IconMouseOver="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImageSuspend.png"
  165. IconPress="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImageSuspend.png"
  166. IconWidth="128" />
  167. <TextBlock
  168. x:Name="NoFileText"
  169. Width="418"
  170. Margin="0,2,0,0"
  171. HorizontalAlignment="Center"
  172. VerticalAlignment="Center"
  173. FontFamily="Segoe UI"
  174. FontSize="12"
  175. FontWeight="Regular"
  176. Foreground="{StaticResource color.sys.text.neutral.lv3}"
  177. TextAlignment="Center"
  178. TextWrapping="Wrap" />
  179. </StackPanel>
  180. <ListView
  181. x:Name="MergeView"
  182. HorizontalContentAlignment="Stretch"
  183. AllowDrop="True"
  184. BorderThickness="0"
  185. DragEnter="MergeView_DragEnter"
  186. DragLeave="MergeView_DragLeave"
  187. DragOver="MergeView_DragOver"
  188. Drop="MergeView_Drop"
  189. ItemContainerStyle="{StaticResource ListViewItemStyle1}"
  190. ItemsSource="{Binding MergeObjectlist}"
  191. PreviewMouseMove="MergeView_PreviewMouseMove"
  192. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  193. Visibility="{Binding Visibility, Converter={StaticResource UnVisivleConvert}, ElementName=NoFileStackPanel}">
  194. <ListView.ItemTemplate>
  195. <DataTemplate>
  196. <Border
  197. x:Name="BackgroundBorder"
  198. Background="Transparent"
  199. CornerRadius="8">
  200. <StackPanel>
  201. <Line
  202. HorizontalAlignment="Stretch"
  203. VerticalAlignment="Bottom"
  204. Stroke="{StaticResource color.item-state.hov.bg}"
  205. StrokeThickness="1"
  206. X1="0"
  207. X2="{Binding ActualWidth, ElementName=ContentPanel}" />
  208. <Grid x:Name="ContentPanel" Height="76">
  209. <Grid.ColumnDefinitions>
  210. <ColumnDefinition Width="41" />
  211. <ColumnDefinition Width="60" />
  212. <ColumnDefinition Width="8" />
  213. <ColumnDefinition Width="372" />
  214. <ColumnDefinition Width="auto" />
  215. <ColumnDefinition Width="16" />
  216. <ColumnDefinition Width="64" />
  217. <ColumnDefinition Width="16" />
  218. <ColumnDefinition Width="16" />
  219. <ColumnDefinition Width="43" />
  220. </Grid.ColumnDefinitions>
  221. <Line
  222. Grid.ColumnSpan="10"
  223. Margin="0,0,0,0"
  224. HorizontalAlignment="Stretch"
  225. VerticalAlignment="Bottom"
  226. Stroke="{StaticResource color.sys.layout.accent}"
  227. StrokeThickness="1"
  228. Visibility="{Binding IsForward, Converter={StaticResource BoolToVisible}}"
  229. X1="0"
  230. X2="{Binding ActualWidth, ElementName=ContentPanel}" />
  231. <Line
  232. Grid.ColumnSpan="10"
  233. Margin="0,0,0,0"
  234. HorizontalAlignment="Stretch"
  235. VerticalAlignment="Top"
  236. Stroke="{StaticResource color.sys.layout.accent}"
  237. StrokeThickness="1"
  238. Visibility="{Binding IsBackwards, Converter={StaticResource BoolToVisible}}"
  239. X1="0"
  240. X2="{Binding ActualWidth, ElementName=ContentPanel}" />
  241. <TextBlock
  242. HorizontalAlignment="Center"
  243. VerticalAlignment="Center"
  244. Text="{Binding ItemIndex}" />
  245. <Image
  246. Grid.Column="1"
  247. Margin="8"
  248. HorizontalAlignment="Stretch"
  249. VerticalAlignment="Center"
  250. Source="{Binding DocThumbnail}"
  251. Stretch="Uniform" />
  252. <StackPanel
  253. Grid.Column="3"
  254. HorizontalAlignment="Stretch"
  255. VerticalAlignment="Center">
  256. <TextBlock
  257. FontFamily="Segoe UI"
  258. FontSize="14"
  259. FontWeight="Regular"
  260. Foreground="{StaticResource color.sys.text.neutral.lv1}"
  261. Text="{Binding DocName}"
  262. TextTrimming="CharacterEllipsis" />
  263. <TextBlock
  264. FontFamily="Segoe UI"
  265. FontSize="14"
  266. FontWeight="Regular"
  267. Foreground="{StaticResource color.sys.text.neutral.lv3}"
  268. Text="{Binding DocPageCount}" />
  269. </StackPanel>
  270. <StackPanel
  271. Grid.Column="4"
  272. HorizontalAlignment="Stretch"
  273. VerticalAlignment="Center">
  274. <customcontrol:WritableComboBox
  275. x:Name="PageRangeComboBox"
  276. Width="150"
  277. Height="30"
  278. EvenPageIsEnabled="{Binding IsEvenPageIsEnabled, Mode=TwoWay}"
  279. LostFocus="PageRangeWritableComboBox_LostFocus"
  280. MaxPageRange="{Binding SDKPageCount}"
  281. PageIndexList="{Binding SetPageRange, Mode=TwoWay}"
  282. SelectedIndex="0"
  283. Text="{Binding SetPageRangeStr, Mode=TwoWay}" />
  284. </StackPanel>
  285. <TextBlock
  286. Grid.Column="6"
  287. HorizontalAlignment="Center"
  288. VerticalAlignment="Center"
  289. Text="{Binding DocSize}"
  290. TextTrimming="CharacterEllipsis" />
  291. <StackPanel
  292. Grid.Column="8"
  293. HorizontalAlignment="Stretch"
  294. VerticalAlignment="Center">
  295. <customcontrol:PathButton
  296. x:Name="DeleteIcon"
  297. Width="16"
  298. Height="16"
  299. HorizontalAlignment="Center"
  300. VerticalAlignment="Center"
  301. HorizontalContentAlignment="Center"
  302. VerticalContentAlignment="Center"
  303. Click="Delete_Click"
  304. CornerRadius="4"
  305. Icon="{StaticResource Ic_DeleteButtonPath}"
  306. IconFill="#616469"
  307. IconHeight="16"
  308. IconMouseOver="{StaticResource Ic_DeleteButtonPath}"
  309. IconMouseOverFill="#616469"
  310. IconPress="{StaticResource Ic_DeleteButtonPath}"
  311. IconPressFill="#616469"
  312. IconWidth="16"
  313. MouseDownBackground="{StaticResource color.item-state.sel.bg.lv3}"
  314. MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  315. MouseOverBackground="{StaticResource color.item-state.hov.bg}"
  316. Visibility="Collapsed" />
  317. </StackPanel>
  318. </Grid>
  319. </StackPanel>
  320. </Border>
  321. <DataTemplate.Triggers>
  322. <Trigger Property="IsMouseOver" Value="True">
  323. <Setter TargetName="DeleteIcon" Property="Visibility" Value="Visible" />
  324. <Setter TargetName="BackgroundBorder" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  325. </Trigger>
  326. </DataTemplate.Triggers>
  327. </DataTemplate>
  328. </ListView.ItemTemplate>
  329. </ListView>
  330. </Grid>
  331. </Border>
  332. <Border
  333. Grid.RowSpan="7"
  334. Grid.Column="3"
  335. Background="{StaticResource color.sys.layout.mg}"
  336. Visibility="Collapsed">
  337. <Grid>
  338. <Grid.RowDefinitions>
  339. <RowDefinition Height="14" />
  340. <RowDefinition Height="*" />
  341. <RowDefinition Height="auto" />
  342. <RowDefinition Height="16" />
  343. </Grid.RowDefinitions>
  344. <Grid.ColumnDefinitions>
  345. <ColumnDefinition Width="16" />
  346. <ColumnDefinition Width="*" />
  347. <ColumnDefinition Width="16" />
  348. </Grid.ColumnDefinitions>
  349. <StackPanel Grid.Row="1" Grid.Column="1">
  350. <TextBlock
  351. VerticalAlignment="Center"
  352. FontFamily="Segoe UI"
  353. FontSize="14"
  354. FontWeight="Bold"
  355. Text=" Page Size" />
  356. <RadioButton
  357. Margin="0,14,0,0"
  358. Content="Original page size"
  359. FontFamily="Segoe UI"
  360. FontSize="14"
  361. FontWeight="Regular"
  362. IsChecked="True"
  363. Tag="0">
  364. <i:Interaction.Triggers>
  365. <i:EventTrigger EventName="Checked">
  366. <i:InvokeCommandAction
  367. Command="{Binding SetPageSizeTypeCommand}"
  368. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  369. PassEventArgsToCommand="True" />
  370. </i:EventTrigger>
  371. </i:Interaction.Triggers>
  372. </RadioButton>
  373. <RadioButton
  374. Margin="0,8,0,0"
  375. Content="A4"
  376. FontFamily="Segoe UI"
  377. FontSize="14"
  378. FontWeight="Regular"
  379. Tag="1">
  380. <i:Interaction.Triggers>
  381. <i:EventTrigger EventName="Checked">
  382. <i:InvokeCommandAction
  383. Command="{Binding SetPageSizeTypeCommand}"
  384. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  385. PassEventArgsToCommand="True" />
  386. </i:EventTrigger>
  387. </i:Interaction.Triggers>
  388. </RadioButton>
  389. <RadioButton
  390. Margin="0,8,0,0"
  391. Content="A3"
  392. FontFamily="Segoe UI"
  393. FontSize="14"
  394. FontWeight="Regular"
  395. Tag="2">
  396. <i:Interaction.Triggers>
  397. <i:EventTrigger EventName="Checked">
  398. <i:InvokeCommandAction
  399. Command="{Binding SetPageSizeTypeCommand}"
  400. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  401. PassEventArgsToCommand="True" />
  402. </i:EventTrigger>
  403. </i:Interaction.Triggers>
  404. </RadioButton>
  405. <RadioButton
  406. Margin="0,8,0,0"
  407. Content="U.S.Letter"
  408. FontFamily="Segoe UI"
  409. FontSize="14"
  410. FontWeight="Regular"
  411. Tag="3">
  412. <i:Interaction.Triggers>
  413. <i:EventTrigger EventName="Checked">
  414. <i:InvokeCommandAction
  415. Command="{Binding SetPageSizeTypeCommand}"
  416. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  417. PassEventArgsToCommand="True" />
  418. </i:EventTrigger>
  419. </i:Interaction.Triggers>
  420. </RadioButton>
  421. <RadioButton
  422. Margin="0,8,0,0"
  423. Content="U.S.Legal"
  424. FontFamily="Segoe UI"
  425. FontSize="14"
  426. FontWeight="Regular"
  427. Tag="4">
  428. <i:Interaction.Triggers>
  429. <i:EventTrigger EventName="Checked">
  430. <i:InvokeCommandAction
  431. Command="{Binding SetPageSizeTypeCommand}"
  432. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  433. PassEventArgsToCommand="True" />
  434. </i:EventTrigger>
  435. </i:Interaction.Triggers>
  436. </RadioButton>
  437. <RadioButton
  438. x:Name="Customized"
  439. Margin="0,8,0,0"
  440. Content="Customized"
  441. FontFamily="Segoe UI"
  442. FontSize="14"
  443. FontWeight="Regular"
  444. Tag="5">
  445. <i:Interaction.Triggers>
  446. <i:EventTrigger EventName="Checked">
  447. <i:InvokeCommandAction
  448. Command="{Binding SetPageSizeTypeCommand}"
  449. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  450. PassEventArgsToCommand="True" />
  451. </i:EventTrigger>
  452. </i:Interaction.Triggers>
  453. </RadioButton>
  454. <StackPanel
  455. Margin="0,8,0,0"
  456. HorizontalAlignment="Stretch"
  457. IsEnabled="{Binding ElementName=Customized, Path=IsChecked}"
  458. Orientation="Horizontal">
  459. <customcontrol:TextBoxEx
  460. x:Name="TextWidth"
  461. Width="85"
  462. LostFocus="TextBoxEx_LostFocus"
  463. PlaceholderText="595"
  464. PreviewKeyDown="TextBoxEx_PreviewKeyDown"
  465. PreviewTextInput="TextBox_PreviewTextInput"
  466. Text="{Binding InputWidth, Mode=TwoWay}" />
  467. <TextBlock
  468. Grid.Column="1"
  469. Margin="8,0"
  470. HorizontalAlignment="Center"
  471. VerticalAlignment="Center"
  472. Text="X" />
  473. <customcontrol:TextBoxEx
  474. x:Name="TextHeight"
  475. Grid.Column="2"
  476. Width="85"
  477. LostFocus="TextBoxEx_LostFocus"
  478. PlaceholderText="841"
  479. PreviewKeyDown="TextBoxEx_PreviewKeyDown"
  480. PreviewTextInput="TextBox_PreviewTextInput"
  481. Text="{Binding InputHeight, Mode=TwoWay}" />
  482. <TextBlock
  483. Margin="8,0,0,0"
  484. VerticalAlignment="Center"
  485. FontFamily="Segoe UI"
  486. FontSize="14"
  487. FontWeight="Regular"
  488. Text="mm" />
  489. </StackPanel>
  490. </StackPanel>
  491. </Grid>
  492. </Border>
  493. <StackPanel
  494. Grid.Row="5"
  495. Grid.Column="1"
  496. HorizontalAlignment="Right"
  497. Orientation="Horizontal">
  498. <Button
  499. x:Name="BtnMerge"
  500. Width="118"
  501. Height="32"
  502. Command="{Binding MergeCommand}"
  503. Content="Merge"
  504. IsEnabled="{Binding MergeObjectlist.Count, Converter={StaticResource MergeListCountToBool}}"
  505. Style="{StaticResource Btn.cta}" />
  506. <Button
  507. x:Name="BtnCancel"
  508. Width="118"
  509. Height="32"
  510. Margin="16,0,0,0"
  511. Command="{Binding CancelCommand}"
  512. Content="Cancel"
  513. Style="{StaticResource btn.sec}">
  514. <i:Interaction.Triggers>
  515. <i:EventTrigger EventName="PreviewMouseDown">
  516. <i:InvokeCommandAction Command="{Binding PreviewCancelDownCommand}" CommandParameter="{Binding ElementName=MergeView}" />
  517. </i:EventTrigger>
  518. </i:Interaction.Triggers>
  519. </Button>
  520. </StackPanel>
  521. <StackPanel
  522. Grid.Row="5"
  523. Grid.Column="1"
  524. Orientation="Horizontal">
  525. <Button
  526. Name="BtnAddFile"
  527. Grid.Row="5"
  528. Grid.Column="1"
  529. Width="113"
  530. Height="32"
  531. VerticalAlignment="Bottom"
  532. Click="BtnAddFile_Click"
  533. Initialized="BtnAddFile_Initialized"
  534. Style="{StaticResource btn.sec}">
  535. <Button.Content>
  536. <Grid Width="110" Height="30">
  537. <TextBlock
  538. Name="TxbAddFileText"
  539. Margin="16,0,0,0"
  540. VerticalAlignment="Center" />
  541. <Path
  542. Width="16"
  543. Height="16"
  544. Margin="16,0"
  545. HorizontalAlignment="Right"
  546. Data="M8 9.80726L3.26513 5L2 6.28448L7.36743 11.734C7.71679 12.0887 8.28321 12.0887 8.63257 11.734L14 6.28448L12.7349 5L8 9.80726Z"
  547. Fill="{StaticResource color.icon.arrow.gray.def}" />
  548. </Grid>
  549. </Button.Content>
  550. <Button.ContextMenu>
  551. <ContextMenu Name="CmAddFile">
  552. <MenuItem
  553. x:Name="MenuAddComboBoxItem"
  554. Command="{Binding AddFilesCommand}"
  555. CommandParameter="0" />
  556. <MenuItem
  557. Name="MenuAddFolderComboBoxItem"
  558. Command="{Binding AddFilesCommand}"
  559. CommandParameter="1" />
  560. <MenuItem
  561. IsEnabled="{Binding AddOpenFileIsEn}"
  562. Name="MenuAddOpenFileComboBoxItem"
  563. Command="{Binding AddFilesCommand}"
  564. CommandParameter="2" />
  565. </ContextMenu>
  566. </Button.ContextMenu>
  567. </Button>
  568. <Border
  569. Grid.Row="5"
  570. Grid.Column="1"
  571. Width="32"
  572. Height="32"
  573. Margin="16,0,0,0"
  574. HorizontalAlignment="Left"
  575. VerticalAlignment="Bottom"
  576. BorderBrush="{StaticResource color.btn.sec.border-color}"
  577. BorderThickness="1"
  578. CornerRadius="4">
  579. <customcontrol:PathButton
  580. x:Name="BtnAdd"
  581. Width="32"
  582. Height="32"
  583. HorizontalAlignment="Center"
  584. VerticalAlignment="Center"
  585. HorizontalContentAlignment="Center"
  586. VerticalContentAlignment="Center"
  587. Command="{Binding ClearCommand}"
  588. CornerRadius="4"
  589. Icon="{StaticResource Ic_ClearButtonPath}"
  590. IconFill="#616469"
  591. IconHeight="16"
  592. IconMouseOver="{StaticResource Ic_ClearButtonPath}"
  593. IconMouseOverFill="#616469"
  594. IconPress="{StaticResource Ic_ClearButtonPath}"
  595. IconPressFill="#616469"
  596. IconWidth="16"
  597. MouseDownBackground="{StaticResource color.item-state.sel.bg.lv3}"
  598. MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  599. MouseOverBackground="{StaticResource color.item-state.hov.bg}" />
  600. </Border>
  601. <StackPanel
  602. Grid.ColumnSpan="2"
  603. Width="245"
  604. Height="20"
  605. Margin="16,0,0,6"
  606. HorizontalAlignment="Right"
  607. VerticalAlignment="Bottom"
  608. Panel.ZIndex="2"
  609. Orientation="Horizontal"
  610. Visibility="{Binding LimitationsConvertVisible}">
  611. <Grid Width="16" Height="16">
  612. <Ellipse
  613. Width="13"
  614. Height="13"
  615. Fill="white"
  616. Stroke="#CED0D4" />
  617. <Path Data="M7.4701 8.91H8.5001L8.7601 5.49L8.8101 4H7.1601L7.2101 5.49L7.4701 8.91ZM7.9901 11.58C8.4901 11.58 8.8701 11.21 8.8701 10.69C8.8701 10.17 8.4901 9.81 7.9901 9.81C7.4801 9.81 7.1001 10.17 7.1001 10.69C7.1001 11.21 7.4701 11.58 7.9901 11.58Z" Fill="#94989C" />
  618. </Grid>
  619. <TextBlock
  620. Height="20"
  621. Margin="4,0,0,0"
  622. FontFamily="Segoe UI"
  623. FontSize="12"
  624. Foreground="#252629"
  625. Text="Merge 2 files for free" />
  626. <TextBlock
  627. Height="20"
  628. Margin="8,0,0,0"
  629. FontFamily="Segoe UI"
  630. FontSize="12"
  631. Foreground="{StaticResource color.light.blue.5}">
  632. <i:Interaction.Triggers>
  633. <i:EventTrigger EventName="MouseDown">
  634. <i:InvokeCommandAction Command="{Binding UnlockMouseDownCommand}" />
  635. </i:EventTrigger>
  636. </i:Interaction.Triggers>
  637. <Underline>
  638. <TextBlock Text="{Binding TextUpgrade}" />
  639. </Underline>
  640. </TextBlock>
  641. </StackPanel>
  642. </StackPanel>
  643. <Border
  644. Grid.RowSpan="7"
  645. Grid.ColumnSpan="5"
  646. Visibility="{Binding ProcessVisible}">
  647. <Border.Background>
  648. <SolidColorBrush Opacity="0.3" Color="#CED0D4" />
  649. </Border.Background>
  650. <Border
  651. x:Name="BdProcess"
  652. Grid.RowSpan="5"
  653. Grid.ColumnSpan="5"
  654. Width="226"
  655. Height="58"
  656. Background="{StaticResource color.sys.layout.dark.bg}"
  657. BorderThickness="0"
  658. CornerRadius="{StaticResource border-radius.8}"
  659. Effect="{StaticResource shadow.neutral.m}">
  660. <Grid Margin="16,13" Background="Transparent">
  661. <StackPanel Orientation="Horizontal">
  662. <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="Adding..." />
  663. </StackPanel>
  664. <Button
  665. Width="12"
  666. Height="12"
  667. Padding="0,0,1,1"
  668. HorizontalAlignment="Right"
  669. VerticalAlignment="Top"
  670. Background="{StaticResource color.sys.layout.dark.bg}"
  671. BorderThickness="0"
  672. Command="{Binding CancelAddFileCommand}"
  673. Style="{StaticResource btn.sec}">
  674. <Path Data="M6.00006 7.06072L9.46973 10.5304L10.5304 9.46973L7.06072 6.00006L10.5304 2.53039L9.46973 1.46973L6.00006 4.9394L2.53039 1.46973L1.46973 2.53039L4.9394 6.00006L1.46973 9.46973L2.53039 10.5304L6.00006 7.06072Z" Fill="#CED0D4" />
  675. </Button>
  676. <ProgressBar
  677. Height="4"
  678. Margin="0,0,0,4"
  679. VerticalAlignment="Bottom"
  680. BorderThickness="0"
  681. Foreground="{StaticResource color.slider.track-filled.norm}"
  682. Maximum="{Binding MaxValue}"
  683. Value="{Binding CurrentValue}" />
  684. </Grid>
  685. </Border>
  686. </Border>
  687. </Grid>
  688. </UserControl>