终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

108 lines
4.6 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.CustomResource.UserControls.TechnologyBase"
  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:local="clr-namespace:BPASmartClient.CustomResource.UserControls"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. d:DesignHeight="70"
  9. d:DesignWidth="80"
  10. mc:Ignorable="d">
  11. <UserControl.Triggers>
  12. <EventTrigger RoutedEvent="UserControl.Loaded">
  13. <BeginStoryboard>
  14. <Storyboard>
  15. <DoubleAnimation
  16. RepeatBehavior="Forever"
  17. Storyboard.TargetName="ell"
  18. Storyboard.TargetProperty="Angle"
  19. To="360"
  20. Duration="0:0:13" />
  21. </Storyboard>
  22. </BeginStoryboard>
  23. </EventTrigger>
  24. </UserControl.Triggers>
  25. <Viewbox>
  26. <Canvas
  27. Width="100"
  28. Height="70"
  29. Background="Transparent">
  30. <Grid
  31. Canvas.Top="35"
  32. Width="100"
  33. Height="100">
  34. <Grid.RenderTransform>
  35. <ScaleTransform ScaleY="0.35" />
  36. </Grid.RenderTransform>
  37. <Ellipse Width="100" Height="100">
  38. <Ellipse.Fill>
  39. <RadialGradientBrush>
  40. <GradientStop Color="#FF042688" />
  41. <GradientStop Offset="1" Color="#FF001149" />
  42. <!--<GradientStop Color="{Binding BackColor, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" />
  43. <GradientStop Offset="1" Color="{Binding BaseColor, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" />-->
  44. </RadialGradientBrush>
  45. </Ellipse.Fill>
  46. </Ellipse>
  47. <Ellipse
  48. Width="90"
  49. Height="90"
  50. Stroke="#012a92"
  51. StrokeThickness="5" />
  52. <Ellipse
  53. Width="80"
  54. Height="80"
  55. RenderTransformOrigin="0.5 0.5"
  56. Stroke="#28aef6"
  57. StrokeDashArray="2 0.6"
  58. StrokeThickness="5">
  59. <Ellipse.Effect>
  60. <DropShadowEffect
  61. BlurRadius="10"
  62. Direction="0"
  63. Opacity="1"
  64. ShadowDepth="0"
  65. Color="Aqua" />
  66. </Ellipse.Effect>
  67. <Ellipse.RenderTransform>
  68. <RotateTransform x:Name="ell" Angle="0" />
  69. </Ellipse.RenderTransform>
  70. </Ellipse>
  71. </Grid>
  72. <Path
  73. Data="M16,50 A 20,8.5 0 1 0 84,50 L84,0 16,0 Z"
  74. Opacity="{Binding Depth, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}"
  75. Stroke="Transparent">
  76. <Path.Fill>
  77. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  78. <GradientStop Color="{Binding BackColor, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" />
  79. <GradientStop Offset="1" Color="{Binding BaseColor, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" />
  80. </LinearGradientBrush>
  81. </Path.Fill>
  82. </Path>
  83. <Grid
  84. Canvas.Left="16"
  85. Canvas.Bottom="20"
  86. Width="68"
  87. Height="50">
  88. <TextBlock
  89. HorizontalAlignment="Center"
  90. VerticalAlignment="Center"
  91. FontSize="{Binding FontSize, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}"
  92. Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}">
  93. <Run Text="{Binding Content, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" />
  94. <Run Text="{Binding Unit, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" />
  95. </TextBlock>
  96. </Grid>
  97. </Canvas>
  98. </Viewbox>
  99. </UserControl>