MergeDialog.xaml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <UserControl x:Class="PDF_Master.Views.Dialog.ToolsDialogs.MergeDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Master.Views.Dialog.PageEditDialogs"
  7. mc:Ignorable="d"
  8. xmlns:prism="http://prismlibrary.com/" xmlns:customcontrol="clr-namespace:PDF_Master.CustomControl" xmlns:dataconvert="clr-namespace:PDF_Master.DataConvert" xmlns:toolsdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.ToolsDialogs" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" d:DataContext="{d:DesignInstance Type=toolsdialogs:MergeDialogViewModel}"
  9. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  10. Width="818"
  11. Height="600"
  12. Loaded="UserControl_Loaded"
  13. >
  14. <UserControl.Resources>
  15. <dataconvert:IndexConverter x:Key="IndexConverter"/>
  16. <dataconvert:BoolToVisible x:Key="BoolToVisible" />
  17. <dataconvert:UnVisivleConvert x:Key="UnVisivleConvert" />
  18. <dataconvert:ListCountToVisible x:Key="ListCountToVisible"/>
  19. <dataconvert:MergeListCountToBool x:Key="MergeListCountToBool"/>
  20. <dataconvert:UnVisibleToBoolConvert x:Key="UnVisibleToBoolConvert"/>
  21. <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" />
  22. <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" />
  23. <SolidColorBrush x:Key="Item.MouseOver.Background" Color="#1F26A0DA"/>
  24. <SolidColorBrush x:Key="Item.MouseOver.Border" Color="#a826A0Da"/>
  25. <SolidColorBrush x:Key="Item.SelectedInactive.Background" Color="#3DDADADA"/>
  26. <SolidColorBrush x:Key="Item.SelectedInactive.Border" Color="#FFDADADA"/>
  27. <SolidColorBrush x:Key="Item.SelectedActive.Background" Color="#3D26A0DA"/>
  28. <SolidColorBrush x:Key="Item.SelectedActive.Border" Color="#FF26A0DA"/>
  29. <Style x:Key="ListViewItemStyle1" TargetType="{x:Type ListViewItem}">
  30. <Setter Property="SnapsToDevicePixels" Value="True"/>
  31. <Setter Property="Padding" Value="0,2,0,0"/>
  32. <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  33. <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
  34. <Setter Property="Background" Value="Transparent"/>
  35. <Setter Property="BorderBrush" Value="Transparent"/>
  36. <Setter Property="BorderThickness" Value="0"/>
  37. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
  38. <Setter Property="Template">
  39. <Setter.Value>
  40. <ControlTemplate TargetType="{x:Type ListViewItem}">
  41. <Border Grid.Row="2" CornerRadius="8" x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
  42. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  43. </Border>
  44. <ControlTemplate.Triggers>
  45. <MultiTrigger>
  46. <MultiTrigger.Conditions>
  47. <Condition Property="IsMouseOver" Value="True"/>
  48. </MultiTrigger.Conditions>
  49. <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}"/>
  50. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}"/>
  51. </MultiTrigger>
  52. <MultiTrigger>
  53. <MultiTrigger.Conditions>
  54. <Condition Property="Selector.IsSelectionActive" Value="False"/>
  55. <Condition Property="IsSelected" Value="True"/>
  56. </MultiTrigger.Conditions>
  57. <Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Background}"/>
  58. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedInactive.Border}"/>
  59. </MultiTrigger>
  60. <MultiTrigger>
  61. <MultiTrigger.Conditions>
  62. <Condition Property="Selector.IsSelectionActive" Value="True"/>
  63. <Condition Property="IsSelected" Value="True"/>
  64. </MultiTrigger.Conditions>
  65. <Setter Property="Background" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}"/>
  66. <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource color.item-state.hov.bg}"/>
  67. </MultiTrigger>
  68. <Trigger Property="IsEnabled" Value="False">
  69. <Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
  70. </Trigger>
  71. </ControlTemplate.Triggers>
  72. </ControlTemplate>
  73. </Setter.Value>
  74. </Setter>
  75. </Style>
  76. </UserControl.Resources>
  77. <Grid Background="{StaticResource color.sys.layout.anti}">
  78. <Grid.ColumnDefinitions>
  79. <ColumnDefinition Width="16"/>
  80. <ColumnDefinition Width="*"/>
  81. <ColumnDefinition Width="16"/>
  82. <ColumnDefinition Width="0"/>
  83. </Grid.ColumnDefinitions>
  84. <Grid.RowDefinitions>
  85. <RowDefinition Height="16"/>
  86. <RowDefinition Height="20"/>
  87. <RowDefinition Height="8"/>
  88. <RowDefinition Height="*"/>
  89. <RowDefinition Height="16"/>
  90. <RowDefinition Height="50"/>
  91. <RowDefinition Height="16"/>
  92. </Grid.RowDefinitions>
  93. <Border Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" Padding="50,6,50,6" Visibility="{Binding Visibility, Converter={StaticResource UnVisivleConvert}, ElementName=NoFileStackPanel}">
  94. <Grid>
  95. <Grid.ColumnDefinitions>
  96. <ColumnDefinition Width="429"/>
  97. <ColumnDefinition Width="160"/>
  98. <ColumnDefinition Width="*"/>
  99. </Grid.ColumnDefinitions>
  100. <TextBlock x:Name="TitleFileName" FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
  101. <TextBlock x:Name="TitlePageRange" Grid.Column="1" FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
  102. <TextBlock x:Name="TitleSize" Grid.Column="2" HorizontalAlignment="Center" FontFamily="Segoe UI" FontSize="12" FontWeight="Bold" Foreground="{StaticResource color.sys.text.neutral.lv1}"/>
  103. </Grid>
  104. </Border>
  105. <Border Grid.Column="1" Grid.Row="3">
  106. <Grid AllowDrop="True" Background="{StaticResource color.sys.layout.anti}"
  107. PreviewDrop="Grid_Drop"
  108. PreviewDragEnter="Grid_DragEnter"
  109. PreviewDragOver="Grid_DragOver"
  110. PreviewDragLeave="Grid_DragLeave"
  111. >
  112. <StackPanel
  113. x:Name="NoFileStackPanel" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding MergeObjectlist.Count, Converter={StaticResource ListCountToVisible}}" >
  114. <customcontrol:ImageButton
  115. Height="128" Width="128" IconHeight="128" IconWidth="128"
  116. Icon="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImage.png"
  117. IconPress="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImageSuspend.png"
  118. IconMouseOver="pack://application:,,,/PDF Master;component/Resources/Dialog/AddImageSuspend.png" Command="{Binding AddFilesCommand}" CommandParameter="0"/>
  119. <TextBlock Width="418" Margin="0,2,0,0" x:Name="NoFileText"
  120. FontSize="12" FontFamily="Segoe UI" HorizontalAlignment="Center" FontWeight="Regular"
  121. Foreground="{StaticResource color.sys.text.neutral.lv3}"
  122. TextAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap"/>
  123. </StackPanel>
  124. <ListView x:Name="MergeView" AllowDrop="True"
  125. ItemContainerStyle="{StaticResource ListViewItemStyle1}"
  126. BorderThickness="0"
  127. Visibility="{Binding Visibility, Converter={StaticResource UnVisivleConvert}, ElementName=NoFileStackPanel}"
  128. Drop="MergeView_Drop"
  129. DragEnter="MergeView_DragEnter"
  130. DragOver="MergeView_DragOver"
  131. DragLeave="MergeView_DragLeave"
  132. PreviewMouseMove="MergeView_PreviewMouseMove"
  133. ItemsSource="{Binding MergeObjectlist}"
  134. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  135. HorizontalContentAlignment="Stretch">
  136. <ListView.ItemTemplate>
  137. <DataTemplate >
  138. <Border x:Name="BackgroundBorder" Background="Transparent" CornerRadius="8">
  139. <StackPanel >
  140. <Line X1="0" X2="{Binding ActualWidth, ElementName=ContentPanel}" HorizontalAlignment="Stretch" StrokeThickness="1" Stroke="{StaticResource color.item-state.hov.bg}" VerticalAlignment="Bottom"/>
  141. <Grid x:Name="ContentPanel" Height="76" >
  142. <Grid.ColumnDefinitions>
  143. <ColumnDefinition Width="41"/>
  144. <ColumnDefinition Width="60"/>
  145. <ColumnDefinition Width="8"/>
  146. <ColumnDefinition Width="372"/>
  147. <ColumnDefinition Width="auto"/>
  148. <ColumnDefinition Width="16"/>
  149. <ColumnDefinition Width="64"/>
  150. <ColumnDefinition Width="16"/>
  151. <ColumnDefinition Width="16"/>
  152. <ColumnDefinition Width="43"/>
  153. </Grid.ColumnDefinitions>
  154. <Line Margin="0,0,0,0" Grid.ColumnSpan="10" Visibility="{Binding IsForward, Converter={StaticResource BoolToVisible}}" X1="0" X2="{Binding ActualWidth, ElementName=ContentPanel}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" StrokeThickness="1" Stroke="{StaticResource color.sys.layout.accent}" />
  155. <Line Margin="0,0,0,0" Grid.ColumnSpan="10" Visibility="{Binding IsBackwards, Converter={StaticResource BoolToVisible}}" X1="0" X2="{Binding ActualWidth, ElementName=ContentPanel}" HorizontalAlignment="Stretch" VerticalAlignment="Top" StrokeThickness="1" Stroke="{StaticResource color.sys.layout.accent}" />
  156. <TextBlock Text="{Binding ItemIndex}"
  157. VerticalAlignment="Center" HorizontalAlignment="Center"/>
  158. <Image Margin="8" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Source="{Binding DocThumbnail}" Stretch="Uniform" />
  159. <StackPanel Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Center">
  160. <TextBlock Text="{Binding DocName}" FontFamily="Segoe UI" FontSize="14" FontWeight="Regular" Foreground="{StaticResource color.sys.text.neutral.lv1}" TextTrimming="CharacterEllipsis"/>
  161. <TextBlock Text="{Binding DocPageCount}" FontFamily="Segoe UI" FontSize="14" FontWeight="Regular" Foreground="{StaticResource color.sys.text.neutral.lv3}"/>
  162. </StackPanel>
  163. <StackPanel Grid.Column="4" HorizontalAlignment="Stretch" VerticalAlignment="Center">
  164. <customcontrol:WritableComboBox SelectedIndex="0" Width="150" Height="30" MaxPageRange="{Binding SDKPageCount}" PageIndexList="{Binding SetPageRange, Mode=TwoWay}" Text="{Binding SetPageRangeStr,Mode=TwoWay}"/>
  165. </StackPanel>
  166. <TextBlock Grid.Column="6" Text="{Binding DocSize}" HorizontalAlignment="Center" VerticalAlignment="Center" TextTrimming="CharacterEllipsis"/>
  167. <StackPanel Grid.Column="8" VerticalAlignment="Center" HorizontalAlignment="Stretch">
  168. <customcontrol:PathButton
  169. Visibility="Collapsed"
  170. HorizontalAlignment="Center"
  171. VerticalAlignment="Center"
  172. VerticalContentAlignment="Center"
  173. x:Name="DeleteIcon"
  174. Width="16" Height="16"
  175. Click="Delete_Click"
  176. Icon="{StaticResource Ic_DeleteButtonPath}" IconFill="#616469"
  177. IconHeight="16" IconWidth="16"
  178. IconMouseOver="{StaticResource Ic_DeleteButtonPath}" IconMouseOverFill="#616469"
  179. IconPress="{StaticResource Ic_DeleteButtonPath}" IconPressFill="#616469"
  180. CornerRadius="4" HorizontalContentAlignment="Center"
  181. MouseOverBackground="{StaticResource color.item-state.hov.bg}"
  182. MouseDownBackground="{StaticResource color.item-state.sel.bg.lv3}"
  183. MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  184. />
  185. </StackPanel>
  186. </Grid>
  187. </StackPanel>
  188. </Border>
  189. <DataTemplate.Triggers>
  190. <Trigger Property="IsMouseOver" Value="True">
  191. <Setter TargetName="DeleteIcon" Property="Visibility" Value="Visible" />
  192. <Setter TargetName="BackgroundBorder" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
  193. </Trigger>
  194. </DataTemplate.Triggers>
  195. </DataTemplate>
  196. </ListView.ItemTemplate>
  197. </ListView>
  198. </Grid>
  199. </Border>
  200. <Border Grid.Column="3" Grid.RowSpan="7" Background="{StaticResource color.sys.layout.mg}" Visibility="Collapsed">
  201. <Grid>
  202. <Grid.RowDefinitions>
  203. <RowDefinition Height="14"/>
  204. <RowDefinition Height="*"/>
  205. <RowDefinition Height="auto"/>
  206. <RowDefinition Height="16"/>
  207. </Grid.RowDefinitions>
  208. <Grid.ColumnDefinitions>
  209. <ColumnDefinition Width="16"/>
  210. <ColumnDefinition Width="*"/>
  211. <ColumnDefinition Width="16"/>
  212. </Grid.ColumnDefinitions>
  213. <StackPanel Grid.Row="1" Grid.Column="1">
  214. <TextBlock Text=" Page Size" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
  215. <RadioButton IsChecked="True" Content="Original page size" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Tag="0" Margin="0,14,0,0">
  216. <i:Interaction.Triggers>
  217. <i:EventTrigger EventName="Checked">
  218. <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
  219. </i:EventTrigger>
  220. </i:Interaction.Triggers>
  221. </RadioButton>
  222. <RadioButton Content="A4" Tag="1" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
  223. <i:Interaction.Triggers>
  224. <i:EventTrigger EventName="Checked">
  225. <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
  226. </i:EventTrigger>
  227. </i:Interaction.Triggers>
  228. </RadioButton>
  229. <RadioButton Content="A3" Tag="2" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
  230. <i:Interaction.Triggers>
  231. <i:EventTrigger EventName="Checked">
  232. <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
  233. </i:EventTrigger>
  234. </i:Interaction.Triggers>
  235. </RadioButton>
  236. <RadioButton Content="U.S.Letter" Tag="3" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
  237. <i:Interaction.Triggers>
  238. <i:EventTrigger EventName="Checked">
  239. <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
  240. </i:EventTrigger>
  241. </i:Interaction.Triggers>
  242. </RadioButton>
  243. <RadioButton Content="U.S.Legal" Tag="4" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
  244. <i:Interaction.Triggers>
  245. <i:EventTrigger EventName="Checked">
  246. <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
  247. </i:EventTrigger>
  248. </i:Interaction.Triggers>
  249. </RadioButton>
  250. <RadioButton x:Name="Customized" Content="Customized" Tag="5" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="0,8,0,0">
  251. <i:Interaction.Triggers>
  252. <i:EventTrigger EventName="Checked">
  253. <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />
  254. </i:EventTrigger>
  255. </i:Interaction.Triggers>
  256. </RadioButton>
  257. <StackPanel IsEnabled="{Binding ElementName=Customized, Path=IsChecked}" Margin="0,8,0,0" Orientation="Horizontal" HorizontalAlignment="Stretch">
  258. <customcontrol:TextBoxEx Width="85" PreviewKeyDown="TextBoxEx_PreviewKeyDown" x:Name="TextWidth" PlaceholderText="595" Text="{Binding InputWidth,Mode=TwoWay}" PreviewTextInput="TextBox_PreviewTextInput" LostFocus="TextBoxEx_LostFocus"/>
  259. <TextBlock Text="X" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="8,0"/>
  260. <customcontrol:TextBoxEx Width="85" PreviewKeyDown="TextBoxEx_PreviewKeyDown" x:Name="TextHeight" PlaceholderText="841" Grid.Column="2" Text="{Binding InputHeight,Mode=TwoWay}" PreviewTextInput="TextBox_PreviewTextInput" LostFocus="TextBoxEx_LostFocus"/>
  261. <TextBlock Text="mm" VerticalAlignment="Center" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Margin="8,0,0,0"/>
  262. </StackPanel>
  263. </StackPanel>
  264. </Grid>
  265. </Border>
  266. <StackPanel Grid.Column="1" Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right">
  267. <Button x:Name="BtnMerge" Width="118" Content="Merge" Height="32" Style="{StaticResource Btn.cta}" Command="{Binding MergeCommand}" IsEnabled="{Binding MergeObjectlist.Count, Converter={StaticResource MergeListCountToBool}}"/>
  268. <Button x:Name="BtnCancel" Margin="16,0,0,0" Width="118" Content="Cancel" Height="32" Style="{StaticResource btn.sec}" Command="{Binding CancelCommand}"/>
  269. </StackPanel>
  270. <StackPanel Grid.Column="1" Grid.Row="5" Orientation="Horizontal" >
  271. <ComboBox Grid.Column="1" SelectedIndex="{Binding ComboBoxSelectedIndex,Mode=TwoWay}" Grid.Row="5" Width="113" Height="32" HorizontalAlignment="Left" VerticalAlignment="Bottom" >
  272. <ComboBoxItem Tag="0">
  273. <TextBlock x:Name="AddComboBoxItemText" />
  274. <i:Interaction.Triggers>
  275. <i:EventTrigger EventName="PreviewMouseUp">
  276. <i:InvokeCommandAction
  277. Command="{Binding AddFilesCommand}"
  278. CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ComboBoxItem}},Path=Tag}"
  279. PassEventArgsToCommand="True" />
  280. </i:EventTrigger>
  281. </i:Interaction.Triggers>
  282. </ComboBoxItem>
  283. <ComboBoxItem Tag="1">
  284. <TextBlock x:Name="AddFolderComboBoxItemText"/>
  285. <i:Interaction.Triggers>
  286. <i:EventTrigger EventName="PreviewMouseUp">
  287. <i:InvokeCommandAction
  288. Command="{Binding AddFilesCommand}"
  289. CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ComboBoxItem}},Path=Tag}"
  290. PassEventArgsToCommand="True" />
  291. </i:EventTrigger>
  292. </i:Interaction.Triggers>
  293. </ComboBoxItem>
  294. <ComboBoxItem Tag="2">
  295. <TextBlock x:Name="AddOpenFileComboBoxItem"/>
  296. <i:Interaction.Triggers>
  297. <i:EventTrigger EventName="PreviewMouseUp">
  298. <i:InvokeCommandAction
  299. Command="{Binding AddFilesCommand}"
  300. CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ComboBoxItem}},Path=Tag}"
  301. PassEventArgsToCommand="True" />
  302. </i:EventTrigger>
  303. </i:Interaction.Triggers>
  304. </ComboBoxItem>
  305. </ComboBox>
  306. <Border Margin="16,0,0,0" BorderThickness="1" Width="32" Height="32" Grid.Column="1" Grid.Row="5" BorderBrush="{StaticResource color.btn.sec.border-color}"
  307. HorizontalAlignment="Left" VerticalAlignment="Bottom" CornerRadius="4">
  308. <customcontrol:PathButton
  309. HorizontalAlignment="Center"
  310. VerticalAlignment="Center"
  311. VerticalContentAlignment="Center"
  312. x:Name="BtnAdd"
  313. Width="32" Height="32"
  314. Command="{Binding ClearCommand}"
  315. Icon="{StaticResource Ic_ClearButtonPath}" IconFill="#616469"
  316. IconHeight="16" IconWidth="16"
  317. IconMouseOver="{StaticResource Ic_ClearButtonPath}" IconMouseOverFill="#616469"
  318. IconPress="{StaticResource Ic_ClearButtonPath}" IconPressFill="#616469"
  319. CornerRadius="4" HorizontalContentAlignment="Center"
  320. MouseOverBackground="{StaticResource color.item-state.hov.bg}"
  321. MouseDownBackground="{StaticResource color.item-state.sel.bg.lv3}"
  322. MouseDownBorderBrush="{StaticResource color.item-state.sel.border.lv3}"
  323. />
  324. </Border>
  325. </StackPanel>
  326. </Grid>
  327. </UserControl>