RingProcessBar.xaml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <UserControl
  2. x:Class="SHJX.Service.Library.Views.RingProcessBar"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. mc:Ignorable="d">
  8. <UserControl.Resources>
  9. <Style x:Key="BtnInfoStyle" TargetType="Button">
  10. <Setter Property="Width" Value="70" />
  11. <Setter Property="Height" Value="25" />
  12. <Setter Property="Foreground" Value="White" />
  13. <Setter Property="BorderThickness" Value="0" />
  14. <Setter Property="Background" Value="#929FDE" />
  15. <Setter Property="Template">
  16. <Setter.Value>
  17. <ControlTemplate TargetType="Button">
  18. <Border
  19. x:Name="border"
  20. Background="{TemplateBinding Background}"
  21. BorderBrush="{TemplateBinding BorderBrush}"
  22. BorderThickness="{TemplateBinding BorderThickness}"
  23. CornerRadius="45"
  24. SnapsToDevicePixels="True">
  25. <TextBlock
  26. HorizontalAlignment="Center"
  27. VerticalAlignment="Center"
  28. FontSize="24"
  29. Foreground="{TemplateBinding Foreground}"
  30. Text="{TemplateBinding Content}" />
  31. </Border>
  32. </ControlTemplate>
  33. </Setter.Value>
  34. </Setter>
  35. </Style>
  36. </UserControl.Resources>
  37. <Viewbox>
  38. <Grid Width="100" Height="100">
  39. <Path
  40. Name="myCycleProcessBar2"
  41. Width="100"
  42. Height="100"
  43. HorizontalAlignment="Center"
  44. VerticalAlignment="Center"
  45. Data="M17,3 A14,15 3 0 1 16,5 "
  46. Opacity="0.5"
  47. Stroke="#929FDE"
  48. StrokeDashOffset="0.3"
  49. StrokeEndLineCap="Round"
  50. StrokeStartLineCap="Round"
  51. StrokeThickness="3">
  52. <Path.Effect>
  53. <DropShadowEffect
  54. BlurRadius="8"
  55. Opacity="0.5"
  56. ShadowDepth="1"
  57. Color="#929FDE" />
  58. </Path.Effect>
  59. </Path>
  60. <Path
  61. Name="myCycleProcessBar1"
  62. Width="82"
  63. Height="82"
  64. HorizontalAlignment="Center"
  65. VerticalAlignment="Center"
  66. Data="M17,3 A14,15 3 0 1 16,5 "
  67. Stroke="#FF8BB9"
  68. StrokeDashArray="0.5 0.3"
  69. StrokeEndLineCap="Round"
  70. StrokeStartLineCap="Round"
  71. StrokeThickness="6" />
  72. <Button
  73. x:Name="RingName"
  74. Width="60"
  75. Height="60"
  76. Margin="0"
  77. HorizontalAlignment="Center"
  78. VerticalAlignment="Center"
  79. BorderBrush="Transparent"
  80. BorderThickness="0"
  81. Style="{StaticResource BtnInfoStyle}" />
  82. </Grid>
  83. </Viewbox>
  84. </UserControl>