PageEditContent.xaml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <UserControl
  2. x:Class="PDF_Office.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_Office.DataConvert"
  6. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  7. xmlns:cussys="clr-namespace:PDF_Office.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_Office.Views.PageEdit"
  11. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  12. xmlns:model="clr-namespace:PDF_Office.Model"
  13. xmlns:pageedit="clr-namespace:PDF_Office.Model.PageEdit"
  14. xmlns:pageedit1="clr-namespace:PDF_Office.ViewModels.PageEdit"
  15. xmlns:prism="http://prismlibrary.com/"
  16. xmlns:viewmodel="clr-namespace:PDF_Office.ViewModels.PageEdit"
  17. xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
  18. Name="PageEdit"
  19. d:DataContext="{d:DesignInstance Type=pageedit1:PageEditContentViewModel}"
  20. d:DesignHeight="450"
  21. d:DesignWidth="800"
  22. prism:ViewModelLocator.AutoWireViewModel="True"
  23. IsVisibleChanged="PageEdit_IsVisibleChanged"
  24. SizeChanged="PageEdit_SizeChanged"
  25. mc:Ignorable="d">
  26. <UserControl.Resources>
  27. <ResourceDictionary>
  28. <convert:BoolToVisible x:Key="BoolToVisibleConvert" />
  29. <convert:UnVisivleConvert x:Key="UnVisibleConvert" />
  30. <DataTemplate x:Key="PageEditListBoxItemTemplate" DataType="{x:Type pageedit:PageEditItem}">
  31. <StackPanel AllowDrop="True">
  32. <Border
  33. Name="BdBorder"
  34. VerticalAlignment="Top"
  35. BorderBrush="Transparent"
  36. BorderThickness="2"
  37. CornerRadius="0">
  38. <Grid
  39. Name="GridRoot"
  40. Width="{Binding ItemSize.Width}"
  41. Height="{Binding ItemSize.Height}"
  42. Margin="1"
  43. Background="Gray">
  44. <Image Source="{Binding Image}" Stretch="Uniform" />
  45. <Border
  46. Width="10"
  47. Height="10"
  48. Margin="0,10,10,0"
  49. HorizontalAlignment="Right"
  50. VerticalAlignment="Top"
  51. Background="Yellow"
  52. Visibility="{Binding HaveBookMark, Converter={StaticResource BoolToVisibleConvert}}" />
  53. </Grid>
  54. </Border>
  55. <Border
  56. Name="BdPageNum"
  57. Margin="0,4,0,0"
  58. HorizontalAlignment="Center"
  59. VerticalAlignment="Bottom"
  60. Background="Transparent">
  61. <StackPanel
  62. Name="StkpnlButtom"
  63. Width="auto"
  64. MinWidth="10"
  65. HorizontalAlignment="Center"
  66. Background="Transparent">
  67. <TextBlock
  68. Width="auto"
  69. Height="22"
  70. Margin="0,4"
  71. HorizontalAlignment="Center"
  72. FontSize="14"
  73. Text="{Binding PageNumber}" />
  74. <TextBlock
  75. Width="auto"
  76. MinHeight="22"
  77. MaxWidth="{Binding ElementName=GridRoot, Path=ActualWidth}"
  78. HorizontalAlignment="Center"
  79. FontSize="14"
  80. Text="{Binding PageSize}"
  81. TextWrapping="Wrap"
  82. Visibility="{Binding ShowPageSize, Converter={StaticResource BoolToVisibleConvert}}" />
  83. </StackPanel>
  84. </Border>
  85. </StackPanel>
  86. </DataTemplate>
  87. <ContextMenu x:Key="ListBoxItemMenu" DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
  88. <MenuItem Header="插入页面" Visibility="Collapsed">
  89. <MenuItem
  90. Command="{Binding InsertCommand}"
  91. CommandParameter="{x:Static model:ParameterNames.InsertType_File}"
  92. Header="插入文件" />
  93. <MenuItem
  94. Command="{Binding InsertCommand}"
  95. CommandParameter="{x:Static model:ParameterNames.InsertType_Blank}"
  96. Header="插入空白页" />
  97. <MenuItem
  98. Command="{Binding InsertCommand}"
  99. CommandParameter="{x:Static model:ParameterNames.InsertType_Custom}"
  100. Header="插入自定义页面" />
  101. </MenuItem>
  102. <MenuItem
  103. Command="{Binding ExtractCommand}"
  104. Header="提取页面"
  105. Visibility="Collapsed" />
  106. <MenuItem
  107. Command="{Binding ReplaceCommand}"
  108. Header="替换页面"
  109. Visibility="Collapsed" />
  110. <MenuItem Command="{Binding DeleteCommand}" Header="删除页面" />
  111. <MenuItem Command="{Binding RightRotateCommand}" Header="顺时针旋转页面" />
  112. <MenuItem Command="{Binding LeftRotateCommand}" Header="逆时针旋转页面" />
  113. <MenuItem Command="{Binding CopyCommand}" Header="复制" />
  114. <MenuItem Command="{Binding CutCommand}" Header="剪切" />
  115. <MenuItem Command="{Binding PasteCommand}" Header="粘贴" />
  116. <MenuItem
  117. Command="{Binding ShowPageSizeCommand}"
  118. Header="显示页面大小"
  119. Visibility="{Binding Source={x:Reference Name=MenuHidePageSize}, Path=Visibility, Converter={StaticResource UnVisibleConvert}}" />
  120. <MenuItem
  121. Name="MenuHidePageSize"
  122. Command="{Binding ShowPageSizeCommand}"
  123. Header="隐藏页面大小"
  124. Visibility="{Binding HasShowPageSize}" />
  125. <MenuItem Command="{Binding PrintCommand}" Header="打印页面" />
  126. </ContextMenu>
  127. <Style BasedOn="{StaticResource subToolBar}" TargetType="{x:Type Button}">
  128. <Setter Property="Width" Value="28" />
  129. <Setter Property="Height" Value="28" />
  130. </Style>
  131. <Style TargetType="{x:Type Path}">
  132. <Setter Property="Fill" Value="{StaticResource color.icon.base.brand}" />
  133. </Style>
  134. </ResourceDictionary>
  135. </UserControl.Resources>
  136. <UserControl.InputBindings>
  137. <KeyBinding Command="{Binding CopyCommand}" Gesture="Ctrl+C" />
  138. <KeyBinding Command="{Binding PasteCommand}" Gesture="Ctrl+V" />
  139. <KeyBinding Command="{Binding CutCommand}" Gesture="Ctrl+X" />
  140. <KeyBinding Command="{Binding RightRotateCommand}" Gesture="Ctrl+R" />
  141. <KeyBinding Command="{Binding LeftRotateCommand}" Gesture="Ctrl+L" />
  142. <KeyBinding Command="{Binding DeleteCommand}" Gesture="Delete" />
  143. <KeyBinding
  144. Key="Add"
  145. Command="{Binding ZoomInCommand}"
  146. Modifiers="Ctrl" />
  147. <KeyBinding
  148. Key="Subtract"
  149. Command="{Binding ZoomOutCommand}"
  150. Modifiers="Ctrl" />
  151. </UserControl.InputBindings>
  152. <Border BorderBrush="#F2F2F2" BorderThickness="0,1,0,0">
  153. <Grid
  154. DragLeave="Grid_DragLeave"
  155. DragOver="Grid_DragOver"
  156. Drop="Grid_Drop"
  157. PreviewDragEnter="Grid_PreviewDragEnter">
  158. <Grid.RowDefinitions>
  159. <RowDefinition Height="auto" />
  160. <RowDefinition />
  161. </Grid.RowDefinitions>
  162. <Grid Height="40" Background="{StaticResource color.sys.layout.mg}">
  163. <StackPanel
  164. Name="StkpnlCenter"
  165. HorizontalAlignment="Center"
  166. Orientation="Horizontal">
  167. <Grid>
  168. <ComboBox
  169. Width="117"
  170. Height="23"
  171. ItemsSource="{Binding PageRangeItems}"
  172. SelectedIndex="{Binding ComboxSelectIndex, Mode=TwoWay}" />
  173. <TextBlock
  174. Width="90"
  175. Margin="3,0"
  176. HorizontalAlignment="Left"
  177. VerticalAlignment="Center"
  178. Background="White"
  179. Text="{Binding TbPageRange}"
  180. Visibility="{Binding TbPageRangeVisibility}" />
  181. <TextBox
  182. Width="90"
  183. Height="20"
  184. Margin="3,0"
  185. HorizontalAlignment="Left"
  186. VerticalContentAlignment="Center"
  187. BorderThickness="0"
  188. InputMethod.IsInputMethodEnabled="False"
  189. IsVisibleChanged="TextBox_IsVisibleChanged"
  190. Visibility="{Binding TxtPageInputVisibility}">
  191. <i:Interaction.Triggers>
  192. <i:EventTrigger EventName="PreviewKeyDown">
  193. <i:InvokeCommandAction Command="{Binding PreviewKeyDown}" PassEventArgsToCommand="True" />
  194. </i:EventTrigger>
  195. <i:EventTrigger EventName="KeyDown">
  196. <i:InvokeCommandAction Command="{Binding KeyDown}" PassEventArgsToCommand="True" />
  197. </i:EventTrigger>
  198. </i:Interaction.Triggers>
  199. </TextBox>
  200. </Grid>
  201. <Button Margin="5" Command="{Binding LeftRotateCommand}">
  202. <Path
  203. Width="29"
  204. Height="28"
  205. 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" />
  206. </Button>
  207. <Button Margin="5" Command="{Binding RightRotateCommand}">
  208. <Path
  209. Width="29"
  210. Height="28"
  211. 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" />
  212. </Button>
  213. <Separator
  214. Width="1"
  215. Height="24"
  216. Margin="5,0"
  217. BorderBrush="#33000000"
  218. BorderThickness="5"
  219. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  220. <Menu
  221. Width="65"
  222. Height="20"
  223. Margin="5"
  224. Visibility="Collapsed">
  225. <MenuItem
  226. Width="65"
  227. Height="20"
  228. Header="插入">
  229. <MenuItem
  230. Command="{Binding InsertCommand}"
  231. CommandParameter="{x:Static model:ParameterNames.InsertType_File}"
  232. Header="插入文件" />
  233. <MenuItem
  234. Command="{Binding InsertCommand}"
  235. CommandParameter="{x:Static model:ParameterNames.InsertType_Blank}"
  236. Header="插入空白页" />
  237. <MenuItem
  238. Command="{Binding InsertCommand}"
  239. CommandParameter="{x:Static model:ParameterNames.InsertType_Custom}"
  240. Header="插入自定义页面" />
  241. </MenuItem>
  242. </Menu>
  243. <Button
  244. Margin="5"
  245. Command="{Binding ExtractCommand}"
  246. Content="提取"
  247. Visibility="Collapsed" />
  248. <Button
  249. Margin="5"
  250. Command="{Binding ReplaceCommand}"
  251. Content="替换"
  252. Visibility="Collapsed" />
  253. <Button
  254. Margin="5"
  255. Command="{Binding SplitCommand}"
  256. Content="拆分"
  257. Visibility="Collapsed" />
  258. <Button
  259. Margin="5"
  260. Command="{Binding ReverseCommand}"
  261. Content="倒序"
  262. Visibility="Collapsed" />
  263. <Separator
  264. Width="1"
  265. Height="24"
  266. Margin="5,0"
  267. BorderBrush="#33000000"
  268. BorderThickness="5"
  269. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}"
  270. Visibility="Collapsed" />
  271. <Button Margin="5" Command="{Binding DeleteCommand}">
  272. <Path
  273. Width="29"
  274. Height="28"
  275. 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" />
  276. </Button>
  277. </StackPanel>
  278. <StackPanel
  279. Name="StkpnlRight"
  280. HorizontalAlignment="Right"
  281. Orientation="Horizontal">
  282. <Button Margin="4" Command="{Binding ZoomInCommand}">
  283. <Path
  284. Width="28"
  285. Height="28"
  286. 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" />
  287. </Button>
  288. <Button Margin="4" Command="{Binding ZoomOutCommand}">
  289. <Path
  290. Width="28"
  291. Height="28"
  292. 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" />
  293. </Button>
  294. </StackPanel>
  295. </Grid>
  296. <Border
  297. Name="GridBOTAHeader"
  298. BorderBrush="{StaticResource color.field.border.norm}"
  299. BorderThickness="0,0,0,1"
  300. Visibility="{Binding IsBOTAThumb}">
  301. <Grid
  302. Height="52"
  303. VerticalAlignment="Center"
  304. Background="{StaticResource color.sys.layout.mg}">
  305. <TextBlock
  306. Margin="16,0"
  307. VerticalAlignment="Center"
  308. FontFamily="Segoe UI"
  309. FontSize="14"
  310. FontWeight="SemiBold"
  311. LineHeight="20"
  312. Text="Thumbnails" />
  313. <ToggleButton
  314. Name="TbnTwoLine"
  315. Width="32"
  316. Height="32"
  317. Margin="16,0"
  318. HorizontalAlignment="Right"
  319. Click="TbnTwoLine_Click"
  320. Style="{StaticResource SubToolbarTgb}">
  321. <Path
  322. Width="32"
  323. Height="32"
  324. 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"
  325. Fill="{Binding ElementName=TbnTwoLine, Path=Foreground}" />
  326. </ToggleButton>
  327. </Grid>
  328. </Border>
  329. <ListBox
  330. Name="ListPageEdit"
  331. Grid.Row="1"
  332. Padding="0"
  333. AllowDrop="False"
  334. BorderThickness="0"
  335. Drop="ListPageEdit_Drop"
  336. FocusVisualStyle="{x:Null}"
  337. ItemTemplate="{StaticResource PageEditListBoxItemTemplate}"
  338. ItemsSource="{Binding PageEditItems}"
  339. PreviewMouseLeftButtonDown="ListPageEdit_PreviewMouseLeftButtonDown"
  340. PreviewMouseLeftButtonUp="ListPageEdit_PreviewMouseLeftButtonUp"
  341. PreviewMouseMove="ListPageEdit_PreviewMouseMove"
  342. ScrollBar.Scroll="ListPageEdit_Scroll"
  343. ScrollViewer.ScrollChanged="ListPageEdit_ScrollChanged"
  344. SelectedIndex="{Binding ListSelectedIndex, Mode=TwoWay}"
  345. SelectionMode="Extended">
  346. <!-- 此处要用循环模式,否则滚动时容易误触发EndSscroll 从而频繁拿图导致卡顿 -->
  347. <ListBox.ItemContainerStyle>
  348. <Style TargetType="{x:Type ListBoxItem}">
  349. <Setter Property="Template" Value="{StaticResource ListBoxItemControlTemplate}" />
  350. <Setter Property="Margin" Value="0,10" />
  351. <Setter Property="Visibility" Value="{Binding Visible}" />
  352. <Setter Property="IsSelected" Value="{Binding Selected, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}" />
  353. <Setter Property="HorizontalAlignment" Value="Center" />
  354. <Setter Property="VerticalAlignment" Value="Center" />
  355. <Setter Property="HorizontalContentAlignment" Value="Center" />
  356. <Setter Property="VerticalContentAlignment" Value="Center" />
  357. <Setter Property="ContextMenu" Value="{StaticResource ListBoxItemMenu}" />
  358. <EventSetter Event="DragLeave" Handler="ListBoxItem_DragLeave" />
  359. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown" />
  360. <EventSetter Event="PreviewMouseDoubleClick" Handler="ListBoxItem_PreviewMouseDoubleClick" />
  361. <Style.Triggers>
  362. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl,Mode=FindAncestor}, Path=DataContext.IsBOTAThumb}" Value="Visible">
  363. <Setter Property="Template" Value="{StaticResource BOTAListBoxItemTemplate}" />
  364. </DataTrigger>
  365. </Style.Triggers>
  366. </Style>
  367. </ListBox.ItemContainerStyle>
  368. <ListBox.ItemsPanel>
  369. <ItemsPanelTemplate>
  370. <!-- item间距自适应 -->
  371. <wpftk:VirtualizingWrapPanel />
  372. </ItemsPanelTemplate>
  373. </ListBox.ItemsPanel>
  374. <i:Interaction.Triggers>
  375. <i:EventTrigger EventName="SelectionChanged">
  376. <i:InvokeCommandAction Command="{Binding SelectionChangedCommand}" PassEventArgsToCommand="True" />
  377. </i:EventTrigger>
  378. </i:Interaction.Triggers>
  379. <ListBox.Style>
  380. <Style TargetType="{x:Type ListBox}">
  381. <Style.Triggers>
  382. <DataTrigger Binding="{Binding ElementName=GridBOTAHeader, Path=Visibility}" Value="Visible">
  383. <Setter Property="Background" Value="{StaticResource color.sys.layout.mg}" />
  384. </DataTrigger>
  385. <DataTrigger Binding="{Binding ElementName=GridBOTAHeader, Path=Visibility}" Value="Collapsed">
  386. <Setter Property="Background" Value="{StaticResource color.sys.layout.bg.view}" />
  387. </DataTrigger>
  388. </Style.Triggers>
  389. </Style>
  390. </ListBox.Style>
  391. </ListBox>
  392. <!-- 框选的矩形框 -->
  393. <Rectangle
  394. Name="RectChoose"
  395. Grid.Row="1"
  396. HorizontalAlignment="Left"
  397. VerticalAlignment="Top"
  398. Fill="#AACCEE"
  399. Opacity="0.3"
  400. Stroke="#AACCEE"
  401. StrokeThickness="2" />
  402. <!-- 插入标记 -->
  403. <Line
  404. Name="LineInset"
  405. Grid.Row="1"
  406. AllowDrop="True"
  407. Drop="MidLane_Drop"
  408. Stroke="#FF477EDE"
  409. StrokeEndLineCap="Triangle"
  410. StrokeStartLineCap="Triangle"
  411. StrokeThickness="5"
  412. Visibility="Collapsed"
  413. X1="20"
  414. X2="20"
  415. Y1="0"
  416. Y2="150" />
  417. <!-- 拖拽虚影 -->
  418. <Image
  419. Name="ImgPicture"
  420. Grid.Row="1"
  421. HorizontalAlignment="Left"
  422. VerticalAlignment="Top"
  423. AllowDrop="True"
  424. Drop="ImgPicture_Drop"
  425. Opacity="0.8"
  426. RenderOptions.BitmapScalingMode="HighQuality"
  427. UseLayoutRounding="True"
  428. Visibility="{Binding ElementName=LineInset, Path=Visibility}" />
  429. <cus:ToastControl
  430. Grid.Row="1"
  431. Width="auto"
  432. Height="auto"
  433. Margin="0,0,0,100"
  434. VerticalAlignment="Bottom"
  435. Background="#89000000"
  436. BeginTime="0:0:0:3"
  437. CornerRadius="4"
  438. FontSize="14"
  439. Foreground="White"
  440. StringContent="{Binding ToastText}"
  441. Visibility="{Binding ShowTip, Mode=TwoWay}"
  442. Duration="0:0:0:3" />
  443. <ProgressBar
  444. Grid.Row="1"
  445. Width="400"
  446. Height="10"
  447. Foreground="Blue"
  448. IsIndeterminate="True"
  449. Visibility="{Binding IsLoading}" />
  450. </Grid>
  451. </Border>
  452. </UserControl>