MergeDialog.xaml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  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. Width="150"
  276. Height="30"
  277. MaxPageRange="{Binding SDKPageCount}"
  278. PageIndexList="{Binding SetPageRange, Mode=TwoWay}"
  279. EvenPageIsEnabled="{Binding IsEvenPageIsEnabled,Mode=TwoWay}"
  280. SelectedIndex="0"
  281. Text="{Binding SetPageRangeStr, Mode=TwoWay}"
  282. LostFocus="PageRangeWritableComboBox_LostFocus"/>
  283. </StackPanel>
  284. <TextBlock
  285. Grid.Column="6"
  286. HorizontalAlignment="Center"
  287. VerticalAlignment="Center"
  288. Text="{Binding DocSize}"
  289. TextTrimming="CharacterEllipsis" />
  290. <StackPanel
  291. Grid.Column="8"
  292. HorizontalAlignment="Stretch"
  293. VerticalAlignment="Center">
  294. <customcontrol:PathButton
  295. x:Name="DeleteIcon"
  296. Width="16"
  297. Height="16"
  298. HorizontalAlignment="Center"
  299. VerticalAlignment="Center"
  300. HorizontalContentAlignment="Center"
  301. VerticalContentAlignment="Center"
  302. Click="Delete_Click"
  303. CornerRadius="4"
  304. Icon="{StaticResource Ic_DeleteButtonPath}"
  305. IconFill="#616469"
  306. IconHeight="16"
  307. IconMouseOver="{StaticResource Ic_DeleteButtonPath}"
  308. IconMouseOverFill="#616469"
  309. IconPress="{StaticResource Ic_DeleteButtonPath}"
  310. IconPressFill="#616469"
  311. IconWidth="16"
  312. MouseDownBackground="{StaticResource color.item-state.sel.bg.lv3}"
  313. MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  314. MouseOverBackground="{StaticResource color.item-state.hov.bg}"
  315. Visibility="Collapsed" />
  316. </StackPanel>
  317. </Grid>
  318. </StackPanel>
  319. </Border>
  320. <DataTemplate.Triggers>
  321. <Trigger Property="IsMouseOver" Value="True">
  322. <Setter TargetName="DeleteIcon" Property="Visibility" Value="Visible" />
  323. <Setter TargetName="BackgroundBorder" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  324. </Trigger>
  325. </DataTemplate.Triggers>
  326. </DataTemplate>
  327. </ListView.ItemTemplate>
  328. </ListView>
  329. </Grid>
  330. </Border>
  331. <Border
  332. Grid.RowSpan="7"
  333. Grid.Column="3"
  334. Background="{StaticResource color.sys.layout.mg}"
  335. Visibility="Collapsed">
  336. <Grid>
  337. <Grid.RowDefinitions>
  338. <RowDefinition Height="14" />
  339. <RowDefinition Height="*" />
  340. <RowDefinition Height="auto" />
  341. <RowDefinition Height="16" />
  342. </Grid.RowDefinitions>
  343. <Grid.ColumnDefinitions>
  344. <ColumnDefinition Width="16" />
  345. <ColumnDefinition Width="*" />
  346. <ColumnDefinition Width="16" />
  347. </Grid.ColumnDefinitions>
  348. <StackPanel Grid.Row="1" Grid.Column="1">
  349. <TextBlock
  350. VerticalAlignment="Center"
  351. FontFamily="Segoe UI"
  352. FontSize="14"
  353. FontWeight="Bold"
  354. Text=" Page Size" />
  355. <RadioButton
  356. Margin="0,14,0,0"
  357. Content="Original page size"
  358. FontFamily="Segoe UI"
  359. FontSize="14"
  360. FontWeight="Regular"
  361. IsChecked="True"
  362. Tag="0">
  363. <i:Interaction.Triggers>
  364. <i:EventTrigger EventName="Checked">
  365. <i:InvokeCommandAction
  366. Command="{Binding SetPageSizeTypeCommand}"
  367. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  368. PassEventArgsToCommand="True" />
  369. </i:EventTrigger>
  370. </i:Interaction.Triggers>
  371. </RadioButton>
  372. <RadioButton
  373. Margin="0,8,0,0"
  374. Content="A4"
  375. FontFamily="Segoe UI"
  376. FontSize="14"
  377. FontWeight="Regular"
  378. Tag="1">
  379. <i:Interaction.Triggers>
  380. <i:EventTrigger EventName="Checked">
  381. <i:InvokeCommandAction
  382. Command="{Binding SetPageSizeTypeCommand}"
  383. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  384. PassEventArgsToCommand="True" />
  385. </i:EventTrigger>
  386. </i:Interaction.Triggers>
  387. </RadioButton>
  388. <RadioButton
  389. Margin="0,8,0,0"
  390. Content="A3"
  391. FontFamily="Segoe UI"
  392. FontSize="14"
  393. FontWeight="Regular"
  394. Tag="2">
  395. <i:Interaction.Triggers>
  396. <i:EventTrigger EventName="Checked">
  397. <i:InvokeCommandAction
  398. Command="{Binding SetPageSizeTypeCommand}"
  399. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  400. PassEventArgsToCommand="True" />
  401. </i:EventTrigger>
  402. </i:Interaction.Triggers>
  403. </RadioButton>
  404. <RadioButton
  405. Margin="0,8,0,0"
  406. Content="U.S.Letter"
  407. FontFamily="Segoe UI"
  408. FontSize="14"
  409. FontWeight="Regular"
  410. Tag="3">
  411. <i:Interaction.Triggers>
  412. <i:EventTrigger EventName="Checked">
  413. <i:InvokeCommandAction
  414. Command="{Binding SetPageSizeTypeCommand}"
  415. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  416. PassEventArgsToCommand="True" />
  417. </i:EventTrigger>
  418. </i:Interaction.Triggers>
  419. </RadioButton>
  420. <RadioButton
  421. Margin="0,8,0,0"
  422. Content="U.S.Legal"
  423. FontFamily="Segoe UI"
  424. FontSize="14"
  425. FontWeight="Regular"
  426. Tag="4">
  427. <i:Interaction.Triggers>
  428. <i:EventTrigger EventName="Checked">
  429. <i:InvokeCommandAction
  430. Command="{Binding SetPageSizeTypeCommand}"
  431. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  432. PassEventArgsToCommand="True" />
  433. </i:EventTrigger>
  434. </i:Interaction.Triggers>
  435. </RadioButton>
  436. <RadioButton
  437. x:Name="Customized"
  438. Margin="0,8,0,0"
  439. Content="Customized"
  440. FontFamily="Segoe UI"
  441. FontSize="14"
  442. FontWeight="Regular"
  443. Tag="5">
  444. <i:Interaction.Triggers>
  445. <i:EventTrigger EventName="Checked">
  446. <i:InvokeCommandAction
  447. Command="{Binding SetPageSizeTypeCommand}"
  448. CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}"
  449. PassEventArgsToCommand="True" />
  450. </i:EventTrigger>
  451. </i:Interaction.Triggers>
  452. </RadioButton>
  453. <StackPanel
  454. Margin="0,8,0,0"
  455. HorizontalAlignment="Stretch"
  456. IsEnabled="{Binding ElementName=Customized, Path=IsChecked}"
  457. Orientation="Horizontal">
  458. <customcontrol:TextBoxEx
  459. x:Name="TextWidth"
  460. Width="85"
  461. LostFocus="TextBoxEx_LostFocus"
  462. PlaceholderText="595"
  463. PreviewKeyDown="TextBoxEx_PreviewKeyDown"
  464. PreviewTextInput="TextBox_PreviewTextInput"
  465. Text="{Binding InputWidth, Mode=TwoWay}" />
  466. <TextBlock
  467. Grid.Column="1"
  468. Margin="8,0"
  469. HorizontalAlignment="Center"
  470. VerticalAlignment="Center"
  471. Text="X" />
  472. <customcontrol:TextBoxEx
  473. x:Name="TextHeight"
  474. Grid.Column="2"
  475. Width="85"
  476. LostFocus="TextBoxEx_LostFocus"
  477. PlaceholderText="841"
  478. PreviewKeyDown="TextBoxEx_PreviewKeyDown"
  479. PreviewTextInput="TextBox_PreviewTextInput"
  480. Text="{Binding InputHeight, Mode=TwoWay}" />
  481. <TextBlock
  482. Margin="8,0,0,0"
  483. VerticalAlignment="Center"
  484. FontFamily="Segoe UI"
  485. FontSize="14"
  486. FontWeight="Regular"
  487. Text="mm" />
  488. </StackPanel>
  489. </StackPanel>
  490. </Grid>
  491. </Border>
  492. <StackPanel
  493. Grid.Row="5"
  494. Grid.Column="1"
  495. HorizontalAlignment="Right"
  496. Orientation="Horizontal">
  497. <Button
  498. x:Name="BtnMerge"
  499. Width="118"
  500. Height="32"
  501. Command="{Binding MergeCommand}"
  502. Content="Merge"
  503. IsEnabled="{Binding MergeObjectlist.Count, Converter={StaticResource MergeListCountToBool}}"
  504. Style="{StaticResource Btn.cta}" />
  505. <Button
  506. x:Name="BtnCancel"
  507. Width="118"
  508. Height="32"
  509. Margin="16,0,0,0"
  510. Command="{Binding CancelCommand}"
  511. Content="Cancel"
  512. Style="{StaticResource btn.sec}" />
  513. </StackPanel>
  514. <StackPanel
  515. Grid.Row="5"
  516. Grid.Column="1"
  517. Orientation="Horizontal">
  518. <ComboBox
  519. Grid.Row="5"
  520. Grid.Column="1"
  521. Width="113"
  522. Height="32"
  523. HorizontalAlignment="Left"
  524. VerticalAlignment="Bottom"
  525. SelectedIndex="{Binding ComboBoxSelectedIndex, Mode=TwoWay}">
  526. <ComboBoxItem Tag="0">
  527. <TextBlock x:Name="AddComboBoxItemText" />
  528. <i:Interaction.Triggers>
  529. <i:EventTrigger EventName="PreviewMouseUp">
  530. <i:InvokeCommandAction
  531. Command="{Binding AddFilesCommand}"
  532. CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ComboBoxItem}}, Path=Tag}"
  533. PassEventArgsToCommand="True" />
  534. </i:EventTrigger>
  535. </i:Interaction.Triggers>
  536. </ComboBoxItem>
  537. <ComboBoxItem Tag="1">
  538. <TextBlock x:Name="AddFolderComboBoxItemText" />
  539. <i:Interaction.Triggers>
  540. <i:EventTrigger EventName="PreviewMouseUp">
  541. <i:InvokeCommandAction
  542. Command="{Binding AddFilesCommand}"
  543. CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ComboBoxItem}}, Path=Tag}"
  544. PassEventArgsToCommand="True" />
  545. </i:EventTrigger>
  546. </i:Interaction.Triggers>
  547. </ComboBoxItem>
  548. <ComboBoxItem Tag="2">
  549. <TextBlock x:Name="AddOpenFileComboBoxItem" />
  550. <i:Interaction.Triggers>
  551. <i:EventTrigger EventName="PreviewMouseUp">
  552. <i:InvokeCommandAction
  553. Command="{Binding AddFilesCommand}"
  554. CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ComboBoxItem}}, Path=Tag}"
  555. PassEventArgsToCommand="True" />
  556. </i:EventTrigger>
  557. </i:Interaction.Triggers>
  558. </ComboBoxItem>
  559. </ComboBox>
  560. <Border
  561. Grid.Row="5"
  562. Grid.Column="1"
  563. Width="32"
  564. Height="32"
  565. Margin="16,0,0,0"
  566. HorizontalAlignment="Left"
  567. VerticalAlignment="Bottom"
  568. BorderBrush="{StaticResource color.btn.sec.border-color}"
  569. BorderThickness="1"
  570. CornerRadius="4">
  571. <customcontrol:PathButton
  572. x:Name="BtnAdd"
  573. Width="32"
  574. Height="32"
  575. HorizontalAlignment="Center"
  576. VerticalAlignment="Center"
  577. HorizontalContentAlignment="Center"
  578. VerticalContentAlignment="Center"
  579. Command="{Binding ClearCommand}"
  580. CornerRadius="4"
  581. Icon="{StaticResource Ic_ClearButtonPath}"
  582. IconFill="#616469"
  583. IconHeight="16"
  584. IconMouseOver="{StaticResource Ic_ClearButtonPath}"
  585. IconMouseOverFill="#616469"
  586. IconPress="{StaticResource Ic_ClearButtonPath}"
  587. IconPressFill="#616469"
  588. IconWidth="16"
  589. MouseDownBackground="{StaticResource color.item-state.sel.bg.lv3}"
  590. MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  591. MouseOverBackground="{StaticResource color.item-state.hov.bg}" />
  592. </Border>
  593. </StackPanel>
  594. </Grid>
  595. </UserControl>