ModalActionWindow.xaml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <Window x:Class="vCloud.GeneratePackages.Tool.ModalActionWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:tool="clr-namespace:vCloud.GeneratePackages.Tool"
  7. mc:Ignorable="d"
  8. Title="{Binding Title}"
  9. Background="Transparent"
  10. WindowStartupLocation="CenterOwner"
  11. ResizeMode="NoResize"
  12. WindowStyle="None"
  13. ShowInTaskbar="False"
  14. AllowsTransparency="True"
  15. Width="350"
  16. Height="150">
  17. <StackPanel Margin="10" >
  18. <Canvas x:Name="canvasBusy"
  19. Width="64"
  20. Height="64"
  21. HorizontalAlignment="Center"
  22. VerticalAlignment="Center">
  23. <Canvas.RenderTransform>
  24. <TransformGroup>
  25. <RotateTransform x:Name="angle" Angle="120" CenterX="32" CenterY="32" />
  26. </TransformGroup>
  27. </Canvas.RenderTransform>
  28. <Path Width="64"
  29. Height="64"
  30. Stretch="Fill"
  31. Stroke="#4682B4"
  32. StrokeStartLineCap="Round"
  33. StrokeThickness="6">
  34. <Path.Data>
  35. <PathGeometry>
  36. <PathFigure StartPoint="1,0">
  37. <ArcSegment IsLargeArc="True"
  38. Point="0,-1"
  39. RotationAngle="90"
  40. Size="4,2"
  41. SweepDirection="Clockwise" />
  42. </PathFigure>
  43. </PathGeometry>
  44. </Path.Data>
  45. </Path>
  46. <Path Canvas.Left="32"
  47. Canvas.Top="-2"
  48. Width="10"
  49. Height="10"
  50. Fill="#4682B4"
  51. Stretch="Fill">
  52. <Path.Data>
  53. <PathGeometry>
  54. <PathFigure StartPoint="0,-1.1">
  55. <LineSegment Point="0.1,-1" />
  56. <LineSegment Point="0,-0.9" />
  57. </PathFigure>
  58. </PathGeometry>
  59. </Path.Data>
  60. </Path>
  61. <Canvas.Triggers>
  62. <!-- Animates the Center position of the
  63. EllipseGeometry. -->
  64. <EventTrigger RoutedEvent="Canvas.Loaded">
  65. <BeginStoryboard>
  66. <Storyboard RepeatBehavior="Forever">
  67. <DoubleAnimation Duration="0:0:3"
  68. From="0"
  69. RepeatBehavior="Forever"
  70. Storyboard.TargetName="angle"
  71. Storyboard.TargetProperty="Angle"
  72. To="359" />
  73. </Storyboard>
  74. </BeginStoryboard>
  75. </EventTrigger>
  76. </Canvas.Triggers>
  77. </Canvas>
  78. <TextBlock Margin="7"
  79. Grid.Row="1" Text="{Binding Description}"
  80. FontWeight="SemiBold"
  81. Foreground="#2F4F4F"
  82. TextWrapping="Wrap"
  83. HorizontalAlignment="Center"
  84. VerticalAlignment="Center"
  85. />
  86. </StackPanel>
  87. </Window>