PageEditContent.xaml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  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. Width="{Binding ItemSize.Width}"
  40. Height="{Binding ItemSize.Height}"
  41. Margin="1"
  42. Background="Gray">
  43. <Image Source="{Binding Image}" Stretch="Uniform" />
  44. <Border
  45. Width="10"
  46. Height="10"
  47. Margin="0,10,10,0"
  48. HorizontalAlignment="Right"
  49. VerticalAlignment="Top"
  50. Background="Yellow"
  51. Visibility="{Binding HaveBookMark, Converter={StaticResource BoolToVisibleConvert}}" />
  52. </Grid>
  53. </Border>
  54. <Border
  55. Name="BdPageNum"
  56. Margin="0,4,0,0"
  57. HorizontalAlignment="Center"
  58. VerticalAlignment="Bottom"
  59. Background="Transparent">
  60. <StackPanel
  61. Name="StkpnlButtom"
  62. Width="auto"
  63. MinWidth="50"
  64. HorizontalAlignment="Center"
  65. Background="Transparent">
  66. <TextBlock
  67. Width="auto"
  68. Height="22"
  69. Margin="0,4"
  70. HorizontalAlignment="Center"
  71. FontSize="14"
  72. Text="{Binding PageNumber}" />
  73. <TextBlock
  74. Width="auto"
  75. Height="22"
  76. HorizontalAlignment="Center"
  77. FontSize="14"
  78. Text="{Binding PageSize}"
  79. Visibility="{Binding ShowPageSize, Converter={StaticResource BoolToVisibleConvert}}" />
  80. </StackPanel>
  81. </Border>
  82. </StackPanel>
  83. <DataTemplate.Triggers>
  84. <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True">
  85. <Setter TargetName="BdBorder" Property="BorderBrush" Value="Blue" />
  86. <Setter TargetName="BdBorder" Property="CornerRadius" Value="4" />
  87. <Setter TargetName="BdPageNum" Property="Background" Value="blue" />
  88. <Setter TargetName="BdPageNum" Property="CornerRadius" Value="4" />
  89. </DataTrigger>
  90. <MultiDataTrigger>
  91. <MultiDataTrigger.Conditions>
  92. <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsMouseOver}" Value="True" />
  93. <Condition Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="False" />
  94. </MultiDataTrigger.Conditions>
  95. <MultiDataTrigger.Setters>
  96. <Setter TargetName="BdBorder" Property="BorderBrush" Value="#68ACF8" />
  97. <Setter TargetName="BdBorder" Property="CornerRadius" Value="4" />
  98. </MultiDataTrigger.Setters>
  99. </MultiDataTrigger>
  100. </DataTemplate.Triggers>
  101. </DataTemplate>
  102. <ContextMenu x:Key="ListBoxItemMenu" DataContext="{Binding Path=DataContext, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
  103. <MenuItem Header="插入页面">
  104. <MenuItem
  105. Command="{Binding InsertCommand}"
  106. CommandParameter="{x:Static model:ParameterNames.InsertType_File}"
  107. Header="插入文件" />
  108. <MenuItem
  109. Command="{Binding InsertCommand}"
  110. CommandParameter="{x:Static model:ParameterNames.InsertType_Blank}"
  111. Header="插入空白页" />
  112. <MenuItem
  113. Command="{Binding InsertCommand}"
  114. CommandParameter="{x:Static model:ParameterNames.InsertType_Custom}"
  115. Header="插入自定义页面" />
  116. </MenuItem>
  117. <MenuItem Command="{Binding ExtractCommand}" Header="提取页面" />
  118. <MenuItem Command="{Binding ReplaceCommand}" Header="替换页面" />
  119. <MenuItem Command="{Binding DeleteCommand}" Header="删除页面" />
  120. <MenuItem Command="{Binding RightRotateCommand}" Header="顺时针旋转页面" />
  121. <MenuItem Command="{Binding LeftRotateCommand}" Header="逆时针旋转页面" />
  122. <MenuItem Command="{Binding CopyCommand}" Header="复制" />
  123. <MenuItem Command="{Binding CutCommand}" Header="剪切" />
  124. <MenuItem Command="{Binding PasteCommand}" Header="粘贴" />
  125. <MenuItem
  126. Command="{Binding ShowPageSizeCommand}"
  127. Header="显示页面大小"
  128. Visibility="{Binding Source={x:Reference Name=MenuHidePageSize}, Path=Visibility, Converter={StaticResource UnVisibleConvert}}" />
  129. <MenuItem
  130. Name="MenuHidePageSize"
  131. Command="{Binding ShowPageSizeCommand}"
  132. Header="隐藏页面大小"
  133. Visibility="{Binding HasShowPageSize}" />
  134. <MenuItem Command="{Binding PrintCommand}" Header="打印页面" />
  135. </ContextMenu>
  136. </ResourceDictionary>
  137. </UserControl.Resources>
  138. <UserControl.InputBindings>
  139. <KeyBinding Command="{Binding CopyCommand}" Gesture="Ctrl+C" />
  140. <KeyBinding Command="{Binding PasteCommand}" Gesture="Ctrl+V" />
  141. <KeyBinding Command="{Binding CutCommand}" Gesture="Ctrl+X" />
  142. <KeyBinding Command="{Binding RightRotateCommand}" Gesture="Ctrl+R" />
  143. <KeyBinding Command="{Binding LeftRotateCommand}" Gesture="Ctrl+L" />
  144. <KeyBinding Command="{Binding DeleteCommand}" Gesture="Delete" />
  145. <KeyBinding
  146. Key="Add"
  147. Command="{Binding ZoomInCommand}"
  148. Modifiers="Ctrl" />
  149. <KeyBinding
  150. Key="Subtract"
  151. Command="{Binding ZoomOutCommand}"
  152. Modifiers="Ctrl" />
  153. </UserControl.InputBindings>
  154. <Border BorderBrush="#F2F2F2" BorderThickness="0,1,0,0">
  155. <Grid
  156. DragLeave="Grid_DragLeave"
  157. DragOver="Grid_DragOver"
  158. Drop="Grid_Drop"
  159. PreviewDragEnter="Grid_PreviewDragEnter">
  160. <Grid.RowDefinitions>
  161. <RowDefinition Height="auto" />
  162. <RowDefinition />
  163. </Grid.RowDefinitions>
  164. <Grid Height="40" Background="#FFFFFF">
  165. <StackPanel
  166. Name="StkpnlCenter"
  167. HorizontalAlignment="Center"
  168. Orientation="Horizontal">
  169. <Grid>
  170. <ComboBox
  171. Width="117"
  172. Height="23"
  173. ItemsSource="{Binding PageRangeItems}"
  174. SelectedIndex="{Binding ComboxSelectIndex, Mode=TwoWay}" />
  175. <TextBlock
  176. Width="90"
  177. Height="20"
  178. Margin="1,0"
  179. HorizontalAlignment="Left"
  180. VerticalAlignment="Center"
  181. Background="White"
  182. Text="{Binding TbPageRange}"
  183. Visibility="{Binding TbPageRangeVisibility}" />
  184. <TextBox
  185. Width="90"
  186. Height="20"
  187. Margin="1,0"
  188. HorizontalAlignment="Left"
  189. Background="White"
  190. InputMethod.IsInputMethodEnabled="False"
  191. IsVisibleChanged="TextBox_IsVisibleChanged"
  192. Visibility="{Binding TxtPageInputVisibility}">
  193. <i:Interaction.Triggers>
  194. <i:EventTrigger EventName="PreviewKeyDown">
  195. <i:InvokeCommandAction Command="{Binding PreviewKeyDown}" PassEventArgsToCommand="True" />
  196. </i:EventTrigger>
  197. <i:EventTrigger EventName="KeyDown">
  198. <i:InvokeCommandAction Command="{Binding KeyDown}" PassEventArgsToCommand="True" />
  199. </i:EventTrigger>
  200. </i:Interaction.Triggers>
  201. </TextBox>
  202. </Grid>
  203. <Button
  204. Width="20"
  205. Height="20"
  206. Margin="5"
  207. Command="{Binding LeftRotateCommand}">
  208. <Path Data="M8,0.5 C11.5898509,0.5 14.5,3.43884135 14.5,7.06408587 C14.5,10.6893304 11.5898509,13.6281717 8,13.6281717 C7.71394437,13.6281717 7.4302177,13.6094794 7.15010992,13.5725129 L8.35355339,14.7859216 L7.64644661,15.5 L5.29289322,13.1232421 L7.64644661,10.7464841 L8.35355339,11.4605625 L7.25820051,12.5682882 C7.50239929,12.6015049 7.7500379,12.6183124 8,12.6183124 C11.0375661,12.6183124 13.5,10.1316005 13.5,7.06408587 C13.5,3.99657128 11.0375661,1.50985937 8,1.50985937 C5.03652085,1.50985937 2.62046086,3.87674756 2.5043672,6.84069777 L2.5,7.06408587 L1.5,7.06408587 C1.5,3.43884135 4.41014913,0.5 8,0.5 Z M8,5.54929683 C8.82842712,5.54929683 9.5,6.22749098 9.5,7.06408587 C9.5,7.90068077 8.82842712,8.57887492 8,8.57887492 C7.17157288,8.57887492 6.5,7.90068077 6.5,7.06408587 C6.5,6.22749098 7.17157288,5.54929683 8,5.54929683 Z M8,6.55915619 C7.72385763,6.55915619 7.5,6.78522091 7.5,7.06408587 C7.5,7.34295084 7.72385763,7.56901556 8,7.56901556 C8.27614237,7.56901556 8.5,7.34295084 8.5,7.06408587 C8.5,6.78522091 8.27614237,6.55915619 8,6.55915619 Z" Fill="Black">
  209. <Path.RenderTransform>
  210. <TransformGroup>
  211. <TranslateTransform X="10.000000" Y="8.000000" />
  212. <ScaleTransform ScaleX="-1" ScaleY="1" />
  213. <TranslateTransform X="25.000000" Y="-8.000000" />
  214. </TransformGroup>
  215. </Path.RenderTransform>
  216. </Path>
  217. </Button>
  218. <Button
  219. Width="20"
  220. Height="20"
  221. Margin="5"
  222. Command="{Binding RightRotateCommand}">
  223. <Path Data="M8,0.5 C11.5898509,0.5 14.5,3.43884135 14.5,7.06408587 C14.5,10.6893304 11.5898509,13.6281717 8,13.6281717 C7.71394437,13.6281717 7.4302177,13.6094794 7.15010992,13.5725129 L8.35355339,14.7859216 L7.64644661,15.5 L5.29289322,13.1232421 L7.64644661,10.7464841 L8.35355339,11.4605625 L7.25820051,12.5682882 C7.50239929,12.6015049 7.7500379,12.6183124 8,12.6183124 C11.0375661,12.6183124 13.5,10.1316005 13.5,7.06408587 C13.5,3.99657128 11.0375661,1.50985937 8,1.50985937 C5.03652085,1.50985937 2.62046086,3.87674756 2.5043672,6.84069777 L2.5,7.06408587 L1.5,7.06408587 C1.5,3.43884135 4.41014913,0.5 8,0.5 Z M8,5.54929683 C8.82842712,5.54929683 9.5,6.22749098 9.5,7.06408587 C9.5,7.90068077 8.82842712,8.57887492 8,8.57887492 C7.17157288,8.57887492 6.5,7.90068077 6.5,7.06408587 C6.5,6.22749098 7.17157288,5.54929683 8,5.54929683 Z M8,6.55915619 C7.72385763,6.55915619 7.5,6.78522091 7.5,7.06408587 C7.5,7.34295084 7.72385763,7.56901556 8,7.56901556 C8.27614237,7.56901556 8.5,7.34295084 8.5,7.06408587 C8.5,6.78522091 8.27614237,6.55915619 8,6.55915619 Z" Fill="Black" />
  224. </Button>
  225. <Separator
  226. Width="1"
  227. Height="24"
  228. Margin="5,0"
  229. BorderBrush="#33000000"
  230. BorderThickness="5"
  231. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  232. <Menu
  233. Width="65"
  234. Height="20"
  235. Margin="5">
  236. <MenuItem
  237. Width="65"
  238. Height="20"
  239. Header="插入">
  240. <MenuItem
  241. Command="{Binding InsertCommand}"
  242. CommandParameter="{x:Static model:ParameterNames.InsertType_File}"
  243. Header="插入文件" />
  244. <MenuItem
  245. Command="{Binding InsertCommand}"
  246. CommandParameter="{x:Static model:ParameterNames.InsertType_Blank}"
  247. Header="插入空白页" />
  248. <MenuItem
  249. Command="{Binding InsertCommand}"
  250. CommandParameter="{x:Static model:ParameterNames.InsertType_Custom}"
  251. Header="插入自定义页面" />
  252. </MenuItem>
  253. </Menu>
  254. <Button
  255. Height="20"
  256. Margin="5"
  257. Command="{Binding ExtractCommand}"
  258. Content="提取" />
  259. <Button
  260. Height="20"
  261. Margin="5"
  262. Command="{Binding ReplaceCommand}"
  263. Content="替换" />
  264. <Button
  265. Height="20"
  266. Margin="5"
  267. Command="{Binding SplitCommand}"
  268. Content="拆分" />
  269. <Button
  270. Height="20"
  271. Margin="5"
  272. Command="{Binding ReverseCommand}"
  273. Content="倒序" />
  274. <Separator
  275. Width="1"
  276. Height="24"
  277. Margin="5,0"
  278. BorderBrush="#33000000"
  279. BorderThickness="5"
  280. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  281. <Button
  282. Height="20"
  283. Margin="5"
  284. Command="{Binding DeleteCommand}"
  285. Content="删除" />
  286. </StackPanel>
  287. <StackPanel
  288. Name="StkpnlRight"
  289. HorizontalAlignment="Right"
  290. Orientation="Horizontal">
  291. <Button
  292. Width="25"
  293. Height="25"
  294. Margin="4"
  295. Command="{Binding ZoomInCommand}">
  296. <Path Data="M6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.12212 13 9.60545 12.4058 10.7442 11.4232L14.821 15.5L15.5 14.821L11.4232 10.7442C12.4058 9.60545 13 8.12212 13 6.5C13 2.91015 10.0899 0 6.5 0ZM6.5 1C9.53757 1 12 3.46243 12 6.5C12 9.53757 9.53757 12 6.5 12C3.46243 12 1 9.53757 1 6.5C1 3.46243 3.46243 1 6.5 1ZM10 6H7V3H6V6H3V7H6V10H7V7H10V6Z" Fill="Black" />
  297. </Button>
  298. <Button
  299. Width="25"
  300. Height="25"
  301. Margin="4"
  302. Command="{Binding ZoomOutCommand}">
  303. <Path Data="M0 6.5C0 2.91015 2.91015 0 6.5 0C10.0899 0 13 2.91015 13 6.5C13 8.12212 12.4058 9.60545 11.4232 10.7442L15.5 14.821L14.821 15.5L10.7442 11.4232C9.60545 12.4058 8.12212 13 6.5 13C2.91015 13 0 10.0899 0 6.5ZM12 6.5C12 3.46243 9.53757 1 6.5 1C3.46243 1 1 3.46243 1 6.5C1 9.53757 3.46243 12 6.5 12C9.53757 12 12 9.53757 12 6.5ZM10 6V7H3V6H10Z" Fill="Black" />
  304. </Button>
  305. </StackPanel>
  306. </Grid>
  307. <Grid
  308. Name="GridBOTAHeader"
  309. Height="52"
  310. VerticalAlignment="Center"
  311. Background="#F3F3F3"
  312. Visibility="{Binding IsBOTAThumb}">
  313. <TextBlock
  314. Margin="16,0"
  315. VerticalAlignment="Center"
  316. FontSize="14"
  317. LineHeight="20"
  318. Text="缩略图" />
  319. <ToggleButton
  320. Name="TbnTwoLine"
  321. Width="16"
  322. Height="16"
  323. Margin="16,0"
  324. HorizontalAlignment="Right"
  325. Click="TbnTwoLine_Click" />
  326. <Separator
  327. Height="1"
  328. Margin="16,0"
  329. VerticalAlignment="Bottom"
  330. Background="#DDDDDD" />
  331. </Grid>
  332. <ListBox
  333. Name="ListPageEdit"
  334. Grid.Row="1"
  335. Padding="0"
  336. AllowDrop="True"
  337. Background="#E7E9EC"
  338. BorderThickness="0"
  339. Drop="ListPageEdit_Drop"
  340. ItemTemplate="{StaticResource PageEditListBoxItemTemplate}"
  341. ItemsSource="{Binding PageEditItems}"
  342. PreviewMouseLeftButtonDown="ListPageEdit_PreviewMouseLeftButtonDown"
  343. PreviewMouseLeftButtonUp="ListPageEdit_PreviewMouseLeftButtonUp"
  344. PreviewMouseMove="ListPageEdit_PreviewMouseMove"
  345. ScrollBar.Scroll="ListPageEdit_Scroll"
  346. ScrollViewer.ScrollChanged="ListPageEdit_ScrollChanged"
  347. SelectedIndex="{Binding ListSelectedIndex, Mode=TwoWay}"
  348. SelectionMode="Extended">
  349. <!-- 此处要用循环模式,否则滚动时容易误触发EndSscroll 从而频繁拿图导致卡顿 -->
  350. <ListBox.ItemContainerStyle>
  351. <Style TargetType="{x:Type ListBoxItem}">
  352. <Setter Property="Template" Value="{StaticResource ListBoxItemControlTemplate}" />
  353. <Setter Property="Margin" Value="0,10" />
  354. <Setter Property="Visibility" Value="{Binding Visible}" />
  355. <Setter Property="IsSelected" Value="{Binding Selected, Mode=OneWayToSource}" />
  356. <Setter Property="HorizontalAlignment" Value="Center" />
  357. <Setter Property="VerticalAlignment" Value="Center" />
  358. <Setter Property="HorizontalContentAlignment" Value="Center" />
  359. <Setter Property="VerticalContentAlignment" Value="Center" />
  360. <Setter Property="ContextMenu" Value="{StaticResource ListBoxItemMenu}" />
  361. <EventSetter Event="DragLeave" Handler="ListBoxItem_DragLeave" />
  362. <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown" />
  363. <EventSetter Event="PreviewMouseDoubleClick" Handler="ListBoxItem_PreviewMouseDoubleClick" />
  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>
  378. <!-- 框选的矩形框 -->
  379. <Rectangle
  380. Name="RectChoose"
  381. Grid.Row="1"
  382. HorizontalAlignment="Left"
  383. VerticalAlignment="Top"
  384. Fill="#AACCEE"
  385. Opacity="0.3"
  386. Stroke="#AACCEE"
  387. StrokeThickness="2" />
  388. <!-- 插入标记 -->
  389. <Line
  390. Name="LineInset"
  391. Grid.Row="1"
  392. AllowDrop="True"
  393. Drop="MidLane_Drop"
  394. Stroke="#FF477EDE"
  395. StrokeEndLineCap="Triangle"
  396. StrokeStartLineCap="Triangle"
  397. StrokeThickness="5"
  398. Visibility="Collapsed"
  399. X1="20"
  400. X2="20"
  401. Y1="0"
  402. Y2="150" />
  403. <!-- 拖拽虚影 -->
  404. <Image
  405. Name="ImgPicture"
  406. Grid.Row="1"
  407. HorizontalAlignment="Left"
  408. VerticalAlignment="Top"
  409. AllowDrop="True"
  410. Drop="ImgPicture_Drop"
  411. Opacity="0.8"
  412. RenderOptions.BitmapScalingMode="HighQuality"
  413. UseLayoutRounding="True"
  414. Visibility="{Binding ElementName=LineInset, Path=Visibility}" />
  415. <cus:ToastControl
  416. Grid.Row="1"
  417. Width="auto"
  418. Height="auto"
  419. Margin="0,0,0,100"
  420. VerticalAlignment="Bottom"
  421. Background="#89000000"
  422. BeginTime="0:0:0:3"
  423. CornerRadius="4"
  424. FontSize="14"
  425. Foreground="White"
  426. StringContent="{Binding ToastText}"
  427. Visibility="{Binding ShowTip, Mode=TwoWay}"
  428. Duration="0:0:0:3" />
  429. <ProgressBar
  430. Grid.Row="1"
  431. Width="400"
  432. Height="50"
  433. IsIndeterminate="True"
  434. Visibility="{Binding IsLoading}" />
  435. </Grid>
  436. </Border>
  437. </UserControl>