PageEditContent.xaml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <UserControl
  2. x:Class="PDF_Master.Views.PageEdit.PageEditContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  6. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:cussys="clr-namespace:PDF_Master.CustomControl.SystemControl"
  8. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  9. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:local="clr-namespace:PDF_Master.Views.PageEdit"
  11. xmlns:mainpage="clr-namespace:PDF_Master.Strings.MainPage"
  12. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  13. xmlns:model="clr-namespace:PDF_Master.Model"
  14. xmlns:pageedit="clr-namespace:PDF_Master.Model.PageEdit"
  15. xmlns:pageedit1="clr-namespace:PDF_Master.ViewModels.PageEdit"
  16. xmlns:prism="http://prismlibrary.com/"
  17. xmlns:viewmodel="clr-namespace:PDF_Master.ViewModels.PageEdit"
  18. xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
  19. Name="PageEdit"
  20. d:DataContext="{d:DesignInstance Type=pageedit1:PageEditContentViewModel}"
  21. d:DesignHeight="450"
  22. d:DesignWidth="800"
  23. prism:ViewModelLocator.AutoWireViewModel="True"
  24. FocusVisualStyle="{x:Null}"
  25. IsVisibleChanged="PageEdit_IsVisibleChanged"
  26. SizeChanged="PageEdit_SizeChanged"
  27. mc:Ignorable="d">
  28. <UserControl.Resources>
  29. <ResourceDictionary>
  30. <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
  31. <convert:UnVisivleConvert x:Key="UnVisibleConvert" />
  32. <DataTemplate x:Key="PageEditListBoxItemTemplate" DataType="{x:Type pageedit:PageEditItem}">
  33. <StackPanel AllowDrop="True">
  34. <Border
  35. Name="BdBorder"
  36. VerticalAlignment="Top"
  37. BorderBrush="Transparent"
  38. BorderThickness="2"
  39. CornerRadius="0">
  40. <Grid
  41. Name="GridRoot"
  42. Width="{Binding ItemSize.Width}"
  43. Height="{Binding ItemSize.Height}"
  44. Margin="1"
  45. Background="Transparent">
  46. <Image Source="{Binding Image}" Stretch="Uniform" />
  47. <Border
  48. Width="10"
  49. Height="10"
  50. Margin="0,10,10,0"
  51. HorizontalAlignment="Right"
  52. VerticalAlignment="Top"
  53. Background="Yellow"
  54. Visibility="{Binding HaveBookMark, Converter={StaticResource BoolToVisibleConvert}}" />
  55. </Grid>
  56. </Border>
  57. <Border
  58. Name="BdPageNum"
  59. Margin="0,4,0,0"
  60. HorizontalAlignment="Center"
  61. VerticalAlignment="Bottom"
  62. Background="Transparent">
  63. <StackPanel
  64. Name="StkpnlButtom"
  65. Width="auto"
  66. MinWidth="10"
  67. HorizontalAlignment="Center"
  68. Background="Transparent">
  69. <TextBlock
  70. Width="auto"
  71. Height="22"
  72. Margin="0,4"
  73. HorizontalAlignment="Center"
  74. FontSize="14"
  75. Text="{Binding PageNumber}" />
  76. <TextBlock
  77. Width="auto"
  78. MinHeight="22"
  79. MaxWidth="{Binding ElementName=GridRoot, Path=ActualWidth}"
  80. HorizontalAlignment="Center"
  81. FontSize="14"
  82. Text="{Binding PageSize}"
  83. TextWrapping="Wrap"
  84. Visibility="{Binding ShowPageSize, Converter={StaticResource BoolToVisibleConvert}}" />
  85. </StackPanel>
  86. </Border>
  87. </StackPanel>
  88. </DataTemplate>
  89. <ContextMenu x:Key="ListBoxItemMenu" DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
  90. <MenuItem Header="插入页面" Visibility="Collapsed">
  91. <MenuItem
  92. Command="{Binding InsertCommand}"
  93. CommandParameter="{x:Static model:ParameterNames.InsertType_File}"
  94. Header="插入文件" />
  95. <MenuItem
  96. Command="{Binding InsertCommand}"
  97. CommandParameter="{x:Static model:ParameterNames.InsertType_Blank}"
  98. Header="插入空白页" />
  99. <MenuItem
  100. Command="{Binding InsertCommand}"
  101. CommandParameter="{x:Static model:ParameterNames.InsertType_Custom}"
  102. Header="插入自定义页面" />
  103. </MenuItem>
  104. <MenuItem
  105. Command="{Binding ExtractCommand}"
  106. Header="提取页面"
  107. Visibility="Collapsed" />
  108. <MenuItem
  109. Command="{Binding ReplaceCommand}"
  110. Header="替换页面"
  111. Visibility="Collapsed" />
  112. <MenuItem Command="{Binding DeleteCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuDelete}" />
  113. <MenuItem Command="{Binding RightRotateCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuRotateClockwise}" />
  114. <MenuItem Command="{Binding LeftRotateCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuRotateCounterclockwise}" />
  115. <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
  116. <MenuItem Command="{Binding CopyCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuCopy}" />
  117. <MenuItem Command="{Binding CutCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuCut}" />
  118. <MenuItem Command="{Binding PasteCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuPaste}" />
  119. <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
  120. <MenuItem
  121. Command="{Binding ShowPageSizeCommand}"
  122. Header="{x:Static mainpage:MainPage.PageEdit_MenuShowPageSize}"
  123. Visibility="{Binding Source={x:Reference Name=MenuHidePageSize}, Path=Visibility, Converter={StaticResource UnVisibleConvert}}" />
  124. <MenuItem
  125. Name="MenuHidePageSize"
  126. Command="{Binding ShowPageSizeCommand}"
  127. Header="隐藏页面大小"
  128. Visibility="{Binding HasShowPageSize}" />
  129. <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
  130. <MenuItem Command="{Binding PrintCommand}" Header="{x:Static mainpage:MainPage.PageEdit_MenuPrint}" />
  131. </ContextMenu>
  132. <Style BasedOn="{StaticResource subToolBar}" TargetType="{x:Type Button}">
  133. <Setter Property="Width" Value="28" />
  134. <Setter Property="Height" Value="28" />
  135. </Style>
  136. <Style TargetType="{x:Type Path}">
  137. <Setter Property="Fill" Value="{StaticResource color.icon.base.brand}" />
  138. </Style>
  139. </ResourceDictionary>
  140. </UserControl.Resources>
  141. <UserControl.InputBindings>
  142. <KeyBinding Command="{Binding CopyCommand}" Gesture="Ctrl+C" />
  143. <KeyBinding Command="{Binding PasteCommand}" Gesture="Ctrl+V" />
  144. <KeyBinding Command="{Binding CutCommand}" Gesture="Ctrl+X" />
  145. <KeyBinding Command="{Binding RightRotateCommand}" Gesture="Ctrl+R" />
  146. <KeyBinding Command="{Binding LeftRotateCommand}" Gesture="Ctrl+L" />
  147. <KeyBinding Command="{Binding DeleteCommand}" Gesture="Delete" />
  148. <KeyBinding Key="Esc" Command="{Binding ClearSelectedCommand}" />
  149. <KeyBinding
  150. Key="Add"
  151. Command="{Binding ZoomInCommand}"
  152. Modifiers="Ctrl" />
  153. <KeyBinding
  154. Key="Subtract"
  155. Command="{Binding ZoomOutCommand}"
  156. Modifiers="Ctrl" />
  157. </UserControl.InputBindings>
  158. <Border
  159. AllowDrop="True"
  160. BorderBrush="#F2F2F2"
  161. BorderThickness="0,1,0,0"
  162. Drop="Border_Drop">
  163. <Grid
  164. DragLeave="Grid_DragLeave"
  165. DragOver="Grid_DragOver"
  166. Drop="Grid_Drop"
  167. PreviewDragEnter="Grid_PreviewDragEnter">
  168. <Grid.RowDefinitions>
  169. <RowDefinition Height="auto" />
  170. <RowDefinition />
  171. </Grid.RowDefinitions>
  172. <Grid Height="40" Background="{StaticResource color.sys.layout.mg}">
  173. <StackPanel
  174. Name="StkpnlCenter"
  175. HorizontalAlignment="Center"
  176. Orientation="Horizontal">
  177. <Grid>
  178. <ComboBox
  179. Width="117"
  180. Height="23"
  181. IsEditable="True"
  182. ItemsSource="{Binding PageRangeItems}"
  183. SelectedIndex="{Binding ComboxSelectIndex, Mode=TwoWay}"
  184. Text="{Binding TbPageRange}">
  185. <i:Interaction.Triggers>
  186. <i:EventTrigger EventName="PreviewKeyDown">
  187. <i:InvokeCommandAction Command="{Binding PreviewKeyDown}" PassEventArgsToCommand="True" />
  188. </i:EventTrigger>
  189. <i:EventTrigger EventName="KeyDown">
  190. <i:InvokeCommandAction Command="{Binding KeyDown}" PassEventArgsToCommand="True" />
  191. </i:EventTrigger>
  192. <i:EventTrigger EventName="LostFocus">
  193. <i:InvokeCommandAction Command="{Binding LostFocusCommand}" PassEventArgsToCommand="True" />
  194. </i:EventTrigger>
  195. </i:Interaction.Triggers>
  196. </ComboBox>
  197. </Grid>
  198. <Button Margin="5" Command="{Binding LeftRotateCommand}">
  199. <Path
  200. Width="29"
  201. Height="28"
  202. Data="M9.61772 12.8118C10.1691 10.0672 12.5932 8 15.5001 8C18.8138 8 21.5001 10.6863 21.5001 14C21.5001 17.3137 18.8138 20 15.5001 20C14.4056 20 13.3823 19.7078 12.5008 19.1979L11.4994 20.9291C12.6771 21.6104 14.0446 22 15.5001 22C19.9184 22 23.5001 18.4183 23.5001 14C23.5001 9.58172 19.9184 6 15.5001 6C11.6625 6 8.45601 8.70211 7.67946 12.3075L6.58239 10.4073L4.85034 11.4073L7.15034 15.3911C7.42648 15.8694 8.03807 16.0332 8.51637 15.7571L12.5001 13.4571L11.5001 11.725L9.61772 12.8118Z" />
  203. </Button>
  204. <Button Margin="5" Command="{Binding RightRotateCommand}">
  205. <Path
  206. Width="29"
  207. Height="28"
  208. Data="M19.4129 12.9758C18.9269 10.15 16.4645 8 13.5 8C10.1863 8 7.5 10.6863 7.5 14C7.5 17.3137 10.1863 20 13.5 20C14.5945 20 15.6178 19.7078 16.4993 19.1979L17.5007 20.9291C16.323 21.6104 14.9555 22 13.5 22C9.08172 22 5.5 18.4183 5.5 14C5.5 9.58172 9.08172 6 13.5 6C17.1531 6 20.2343 8.44856 21.192 11.794L21.7091 9.86404L23.641 10.3817L22.4504 14.8249C22.3075 15.3584 21.7591 15.675 21.2257 15.532L16.7824 14.3415L17.3 12.4096L19.4129 12.9758Z" />
  209. </Button>
  210. <Separator
  211. Width="1"
  212. Height="24"
  213. Margin="5,0"
  214. BorderBrush="#33000000"
  215. BorderThickness="5"
  216. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  217. <Menu
  218. Width="65"
  219. Height="20"
  220. Margin="5"
  221. Visibility="Collapsed">
  222. <MenuItem
  223. Width="65"
  224. Height="20"
  225. Header="插入">
  226. <MenuItem
  227. Command="{Binding InsertCommand}"
  228. CommandParameter="{x:Static model:ParameterNames.InsertType_File}"
  229. Header="插入文件" />
  230. <MenuItem
  231. Command="{Binding InsertCommand}"
  232. CommandParameter="{x:Static model:ParameterNames.InsertType_Blank}"
  233. Header="插入空白页" />
  234. <MenuItem
  235. Command="{Binding InsertCommand}"
  236. CommandParameter="{x:Static model:ParameterNames.InsertType_Custom}"
  237. Header="插入自定义页面" />
  238. </MenuItem>
  239. </Menu>
  240. <Button
  241. Margin="5"
  242. Command="{Binding ExtractCommand}"
  243. Content="提取"
  244. Visibility="Collapsed" />
  245. <Button
  246. Margin="5"
  247. Command="{Binding ReplaceCommand}"
  248. Content="替换"
  249. Visibility="Collapsed" />
  250. <Button
  251. Margin="5"
  252. Command="{Binding SplitCommand}"
  253. Content="拆分"
  254. Visibility="Collapsed" />
  255. <Button
  256. Margin="5"
  257. Command="{Binding ReverseCommand}"
  258. Content="倒序"
  259. Visibility="Collapsed" />
  260. <Separator
  261. Width="1"
  262. Height="24"
  263. Margin="5,0"
  264. BorderBrush="#33000000"
  265. BorderThickness="5"
  266. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}"
  267. Visibility="Collapsed" />
  268. <Button Margin="5" Command="{Binding DeleteCommand}">
  269. <Path
  270. Width="29"
  271. Height="28"
  272. Data="M12.5 6H16.5V4H12.5V6ZM21.5 9H23.5V7H19.5H9.5H5.5V9H7.5V22C7.5 23.1046 8.39543 24 9.5 24H19.5C20.6046 24 21.5 23.1046 21.5 22V9ZM19.5 9H9.5V22H19.5V9ZM13.5 19L13.5 12H15.5V19H13.5Z" />
  273. </Button>
  274. </StackPanel>
  275. <StackPanel
  276. Name="StkpnlRight"
  277. HorizontalAlignment="Right"
  278. Orientation="Horizontal">
  279. <Button Margin="4" Command="{Binding ZoomInCommand}">
  280. <Path
  281. Width="28"
  282. Height="28"
  283. Data="M20 12.5C20 16.0899 17.0899 19 13.5 19C9.91015 19 7 16.0899 7 12.5C7 8.91015 9.91015 6 13.5 6C17.0899 6 20 8.91015 20 12.5ZM18.2928 19.5209C16.9284 20.4541 15.2779 21 13.5 21C8.80558 21 5 17.1944 5 12.5C5 7.80558 8.80558 4 13.5 4C18.1944 4 22 7.80558 22 12.5C22 14.6954 21.1677 16.6965 19.8013 18.2048L23.4741 22.0603L22.026 23.4397L18.2928 19.5209ZM12.5 9V11.5H10V13.5H12.5V16H14.5V13.5H17V11.5H14.5V9H12.5Z" />
  284. </Button>
  285. <Button Margin="4" Command="{Binding ZoomOutCommand}">
  286. <Path
  287. Width="28"
  288. Height="28"
  289. Data="M20 12.5C20 16.0899 17.0899 19 13.5 19C9.91015 19 7 16.0899 7 12.5C7 8.91015 9.91015 6 13.5 6C17.0899 6 20 8.91015 20 12.5ZM18.2928 19.5209C16.9284 20.4541 15.2779 21 13.5 21C8.80558 21 5 17.1944 5 12.5C5 7.80558 8.80558 4 13.5 4C18.1944 4 22 7.80558 22 12.5C22 14.6954 21.1677 16.6965 19.8013 18.2048L23.4741 22.0603L22.026 23.4397L18.2928 19.5209ZM10 11.5H17V13.5H10V11.5Z" />
  290. </Button>
  291. </StackPanel>
  292. </Grid>
  293. <Border
  294. Name="GridBOTAHeader"
  295. BorderBrush="{StaticResource color.field.border.norm}"
  296. BorderThickness="0,0,0,1"
  297. Visibility="{Binding IsBOTAThumb}">
  298. <Grid
  299. Height="52"
  300. VerticalAlignment="Center"
  301. Background="{StaticResource color.sys.layout.mg}">
  302. <TextBlock
  303. Margin="16,0"
  304. VerticalAlignment="Center"
  305. FontFamily="Segoe UI"
  306. FontSize="14"
  307. FontWeight="SemiBold"
  308. LineHeight="20"
  309. Text="{Binding T_Title}" />
  310. <ToggleButton
  311. Name="TbnTwoLine"
  312. Width="32"
  313. Height="32"
  314. Margin="16,0"
  315. HorizontalAlignment="Right"
  316. Click="TbnTwoLine_Click"
  317. Style="{StaticResource SubToolbarTgb}">
  318. <Path
  319. Width="32"
  320. Height="32"
  321. Data="M18.2998 21.6998V10.2998H21.6998V21.6998H18.2998ZM16.7998 9.59981C16.7998 9.15798 17.1579 8.7998 17.5998 8.7998H22.3998C22.8416 8.7998 23.1998 9.15798 23.1998 9.5998V22.3998C23.1998 22.8416 22.8416 23.1998 22.3998 23.1998H17.5998C17.1579 23.1998 16.7998 22.8416 16.7998 22.3998V9.59981ZM10.2998 21.6998V10.2998H13.6998V21.6998H10.2998ZM8.7998 9.59981C8.7998 9.15798 9.15798 8.79981 9.5998 8.79981H14.3998C14.8416 8.79981 15.1998 9.15798 15.1998 9.59981V22.3998C15.1998 22.8416 14.8416 23.1998 14.3998 23.1998H9.59981C9.15798 23.1998 8.7998 22.8416 8.7998 22.3998V9.59981Z"
  322. Fill="{Binding ElementName=TbnTwoLine, Path=Foreground}" />
  323. </ToggleButton>
  324. </Grid>
  325. </Border>
  326. <ListBox
  327. Name="ListPageEdit"
  328. Grid.Row="1"
  329. Padding="0"
  330. AllowDrop="True"
  331. BorderThickness="0"
  332. Drop="ListPageEdit_Drop"
  333. FocusVisualStyle="{x:Null}"
  334. ItemTemplate="{StaticResource PageEditListBoxItemTemplate}"
  335. ItemsSource="{Binding PageEditItems}"
  336. PreviewMouseLeftButtonDown="ListPageEdit_PreviewMouseLeftButtonDown"
  337. PreviewMouseLeftButtonUp="ListPageEdit_PreviewMouseLeftButtonUp"
  338. PreviewMouseMove="ListPageEdit_PreviewMouseMove"
  339. ScrollBar.Scroll="ListPageEdit_Scroll"
  340. ScrollViewer.ScrollChanged="ListPageEdit_ScrollChanged"
  341. SelectedIndex="{Binding ListSelectedIndex, Mode=TwoWay}"
  342. SelectionMode="Extended">
  343. <!-- 此处要用循环模式,否则滚动时容易误触发EndSscroll 从而频繁拿图导致卡顿 -->
  344. <ListBox.ItemContainerStyle>
  345. <Style TargetType="{x:Type ListBoxItem}">
  346. <Setter Property="Template" Value="{StaticResource ListBoxItemControlTemplate}" />
  347. <Setter Property="Margin" Value="0,10" />
  348. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  349. <Setter Property="Visibility" Value="{Binding Visible}" />
  350. <Setter Property="IsSelected" Value="{Binding Selected, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}" />
  351. <Setter Property="HorizontalAlignment" Value="Center" />
  352. <Setter Property="VerticalAlignment" Value="Center" />
  353. <Setter Property="HorizontalContentAlignment" Value="Center" />
  354. <Setter Property="VerticalContentAlignment" Value="Center" />
  355. <Setter Property="ContextMenu" Value="{StaticResource ListBoxItemMenu}" />
  356. <EventSetter Event="DragLeave" Handler="ListBoxItem_DragLeave" />
  357. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown" />
  358. <EventSetter Event="PreviewMouseDoubleClick" Handler="ListBoxItem_PreviewMouseDoubleClick" />
  359. <Style.Triggers>
  360. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}, Path=DataContext.IsBOTAThumb}" Value="Visible">
  361. <Setter Property="Template" Value="{StaticResource BOTAListBoxItemTemplate}" />
  362. </DataTrigger>
  363. </Style.Triggers>
  364. </Style>
  365. </ListBox.ItemContainerStyle>
  366. <ListBox.ItemsPanel>
  367. <ItemsPanelTemplate>
  368. <!-- item间距自适应 -->
  369. <wpftk:VirtualizingWrapPanel />
  370. </ItemsPanelTemplate>
  371. </ListBox.ItemsPanel>
  372. <i:Interaction.Triggers>
  373. <i:EventTrigger EventName="SelectionChanged">
  374. <i:InvokeCommandAction Command="{Binding SelectionChangedCommand}" PassEventArgsToCommand="True" />
  375. </i:EventTrigger>
  376. </i:Interaction.Triggers>
  377. <ListBox.Style>
  378. <Style TargetType="{x:Type ListBox}">
  379. <Style.Triggers>
  380. <DataTrigger Binding="{Binding ElementName=GridBOTAHeader, Path=Visibility}" Value="Visible">
  381. <Setter Property="Background" Value="{StaticResource color.sys.layout.mg}" />
  382. </DataTrigger>
  383. <DataTrigger Binding="{Binding ElementName=GridBOTAHeader, Path=Visibility}" Value="Collapsed">
  384. <Setter Property="Background" Value="{StaticResource color.sys.layout.bg.view}" />
  385. </DataTrigger>
  386. </Style.Triggers>
  387. </Style>
  388. </ListBox.Style>
  389. </ListBox>
  390. <!-- 框选的矩形框 -->
  391. <Rectangle
  392. Name="RectChoose"
  393. Grid.Row="1"
  394. HorizontalAlignment="Left"
  395. VerticalAlignment="Top"
  396. Fill="#AACCEE"
  397. Opacity="0.3"
  398. Stroke="#AACCEE"
  399. StrokeThickness="2" />
  400. <!-- 插入标记 -->
  401. <Line
  402. Name="LineInset"
  403. Grid.Row="1"
  404. AllowDrop="True"
  405. Drop="MidLane_Drop"
  406. Stroke="#FF477EDE"
  407. StrokeEndLineCap="Triangle"
  408. StrokeStartLineCap="Triangle"
  409. StrokeThickness="5"
  410. Visibility="Collapsed"
  411. X1="20"
  412. X2="20"
  413. Y1="0"
  414. Y2="150" />
  415. <!-- 拖拽虚影 -->
  416. <Image
  417. Name="ImgPicture"
  418. Grid.Row="1"
  419. HorizontalAlignment="Left"
  420. VerticalAlignment="Top"
  421. AllowDrop="True"
  422. Drop="ImgPicture_Drop"
  423. Opacity="0.8"
  424. RenderOptions.BitmapScalingMode="HighQuality"
  425. UseLayoutRounding="True"
  426. Visibility="{Binding ElementName=LineInset, Path=Visibility}" />
  427. <cus:ToastControl
  428. Grid.Row="1"
  429. Width="auto"
  430. Height="auto"
  431. Margin="0,0,0,100"
  432. VerticalAlignment="Bottom"
  433. Background="#89000000"
  434. BeginTime="0:0:0:3"
  435. CornerRadius="4"
  436. FontSize="14"
  437. Foreground="White"
  438. StringContent="{Binding ToastText}"
  439. Visibility="{Binding ShowTip, Mode=TwoWay}"
  440. Duration="0:0:0:3" />
  441. <!--<ProgressBar
  442. Grid.Row="1"
  443. Width="400"
  444. Height="10"
  445. Foreground="Blue"
  446. IsIndeterminate="True"
  447. Visibility="{Binding IsLoading}" />-->
  448. </Grid>
  449. </Border>
  450. </UserControl>