MergeDialog.xaml 33 KB

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