终端一体化运控平台
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

97 lignes
5.4 KiB

  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="clr-namespace:BPASmartClient.SCADAControl"
  5. xmlns:ctrl="clr-namespace:BPASmartClient.SCADAControl">
  6. <!--<Style TargetType="{x:Type local:CustomControl1}">
  7. <Setter Property="Template">
  8. <Setter.Value>
  9. <ControlTemplate TargetType="{x:Type local:CustomControl1}">
  10. <Border Background="{TemplateBinding Background}"
  11. BorderBrush="{TemplateBinding BorderBrush}"
  12. BorderThickness="{TemplateBinding BorderThickness}">
  13. </Border>
  14. </ControlTemplate>
  15. </Setter.Value>
  16. </Setter>
  17. </Style>-->
  18. <Style TargetType="{x:Type ctrl:ArcGauge}">
  19. <Setter Property="Background" Value="#646464"/>
  20. <Setter Property="Foreground" Value="Black"/>
  21. <Setter Property="Template">
  22. <Setter.Value>
  23. <ControlTemplate TargetType="{x:Type ctrl:ArcGauge}">
  24. <Border Margin="10">
  25. <Grid Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}">
  26. <Ellipse Fill="#FF3B3B3B"/>
  27. <Grid RenderTransformOrigin="0.5,0.5" Margin="2">
  28. <Grid.RenderTransform>
  29. <TransformGroup>
  30. <RotateTransform Angle="{Binding Path=Angle,ElementName=PointRotate}"/>
  31. </TransformGroup>
  32. </Grid.RenderTransform>
  33. <Ellipse Width="16" Height="14" Fill="Orange" VerticalAlignment="Top" >
  34. <Ellipse.Effect>
  35. <BlurEffect Radius="12"/>
  36. </Ellipse.Effect>
  37. </Ellipse>
  38. </Grid>
  39. <Grid x:Name="bdGrid" Margin="12" UseLayoutRounding="True" ClipToBounds="True">
  40. <Ellipse>
  41. <Ellipse.Fill>
  42. <RadialGradientBrush>
  43. <GradientStop Color="#4D000000"/>
  44. </RadialGradientBrush>
  45. </Ellipse.Fill>
  46. </Ellipse>
  47. <Grid>
  48. <Grid.ColumnDefinitions>
  49. <ColumnDefinition/>
  50. <ColumnDefinition Width="2*"/>
  51. <ColumnDefinition/>
  52. </Grid.ColumnDefinitions>
  53. <Grid.RowDefinitions>
  54. <RowDefinition/>
  55. <RowDefinition Height="2*"/>
  56. <RowDefinition/>
  57. </Grid.RowDefinitions>
  58. <Ellipse Stroke="#464646" StrokeThickness="1" Grid.Column="1" Grid.Row="1"/>
  59. <Ellipse Stroke="#959595" Margin="4" StrokeThickness="6" Grid.Column="1" Grid.Row="1"/>
  60. <Ellipse Stroke="#464646" Margin="14" StrokeThickness="1" Grid.Column="1" Grid.Row="1"/>
  61. </Grid>
  62. <Grid>
  63. <Grid.RowDefinitions>
  64. <RowDefinition/>
  65. <RowDefinition/>
  66. </Grid.RowDefinitions>
  67. <Path Data="M5,0 5,0 10,120 0,120z" Fill="#0FA9CE" Stretch="Uniform" Margin="0 30 0 0" RenderTransformOrigin="0.5,1" HorizontalAlignment="Center">
  68. <Path.RenderTransform>
  69. <TransformGroup>
  70. <RotateTransform x:Name="PointRotate"/>
  71. </TransformGroup>
  72. </Path.RenderTransform>
  73. </Path>
  74. </Grid>
  75. <Ellipse Width="28" Height="28" Fill="Black">
  76. <Ellipse.Effect>
  77. <DropShadowEffect Color="#0FA9CE" ShadowDepth="0" Direction="0" BlurRadius="16"/>
  78. </Ellipse.Effect>
  79. </Ellipse>
  80. <Border VerticalAlignment="Bottom" BorderBrush="#10ABD1" BorderThickness="2" Margin="0 0 0 12" Background="Black" Padding="4 2" HorizontalAlignment="Center">
  81. <TextBlock Text="{Binding Value,RelativeSource={RelativeSource Mode=TemplatedParent},StringFormat={}{0:f1}}" FontSize="16" Width="46" TextAlignment="Center" Foreground="White"/>
  82. </Border>
  83. </Grid>
  84. </Grid>
  85. </Border>
  86. </ControlTemplate>
  87. </Setter.Value>
  88. </Setter>
  89. </Style>
  90. </ResourceDictionary>