终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

136 linhas
7.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. xmlns:con="clr-namespace:BPASmartClient.SCADAControl.Converters">
  7. <!--<Style TargetType="{x:Type local:CustomControl1}">
  8. <Setter Property="Template">
  9. <Setter.Value>
  10. <ControlTemplate TargetType="{x:Type local:CustomControl1}">
  11. <Border Background="{TemplateBinding Background}"
  12. BorderBrush="{TemplateBinding BorderBrush}"
  13. BorderThickness="{TemplateBinding BorderThickness}">
  14. </Border>
  15. </ControlTemplate>
  16. </Setter.Value>
  17. </Setter>
  18. </Style>-->
  19. <Style TargetType="{x:Type ctrl:ArcGauge}">
  20. <Setter Property="Background" Value="#646464"/>
  21. <Setter Property="Foreground" Value="Black"/>
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type ctrl:ArcGauge}">
  25. <Border Margin="10">
  26. <Grid Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}">
  27. <Ellipse Fill="#FF3B3B3B"/>
  28. <Grid RenderTransformOrigin="0.5,0.5" Margin="2">
  29. <Grid.RenderTransform>
  30. <TransformGroup>
  31. <RotateTransform Angle="{Binding Path=Angle,ElementName=PointRotate}"/>
  32. </TransformGroup>
  33. </Grid.RenderTransform>
  34. <Ellipse Width="16" Height="14" Fill="Orange" VerticalAlignment="Top" >
  35. <Ellipse.Effect>
  36. <BlurEffect Radius="12"/>
  37. </Ellipse.Effect>
  38. </Ellipse>
  39. </Grid>
  40. <Grid x:Name="bdGrid" Margin="12" UseLayoutRounding="True" ClipToBounds="True">
  41. <Ellipse>
  42. <Ellipse.Fill>
  43. <RadialGradientBrush>
  44. <GradientStop Color="#4D000000"/>
  45. </RadialGradientBrush>
  46. </Ellipse.Fill>
  47. </Ellipse>
  48. <Grid>
  49. <Grid.ColumnDefinitions>
  50. <ColumnDefinition/>
  51. <ColumnDefinition Width="2*"/>
  52. <ColumnDefinition/>
  53. </Grid.ColumnDefinitions>
  54. <Grid.RowDefinitions>
  55. <RowDefinition/>
  56. <RowDefinition Height="2*"/>
  57. <RowDefinition/>
  58. </Grid.RowDefinitions>
  59. <Ellipse Stroke="#464646" StrokeThickness="1" Grid.Column="1" Grid.Row="1"/>
  60. <Ellipse Stroke="#959595" Margin="4" StrokeThickness="6" Grid.Column="1" Grid.Row="1"/>
  61. <Ellipse Stroke="#464646" Margin="14" StrokeThickness="1" Grid.Column="1" Grid.Row="1"/>
  62. </Grid>
  63. <Grid>
  64. <Grid.RowDefinitions>
  65. <RowDefinition/>
  66. <RowDefinition/>
  67. </Grid.RowDefinitions>
  68. <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">
  69. <Path.RenderTransform>
  70. <TransformGroup>
  71. <RotateTransform x:Name="PointRotate"/>
  72. </TransformGroup>
  73. </Path.RenderTransform>
  74. </Path>
  75. </Grid>
  76. <Ellipse Width="28" Height="28" Fill="Black">
  77. <Ellipse.Effect>
  78. <DropShadowEffect Color="#0FA9CE" ShadowDepth="0" Direction="0" BlurRadius="16"/>
  79. </Ellipse.Effect>
  80. </Ellipse>
  81. <Border VerticalAlignment="Bottom" BorderBrush="#10ABD1" BorderThickness="2" Margin="0 0 0 12" Background="Black" Padding="4 2" HorizontalAlignment="Center">
  82. <TextBlock Text="{Binding Value,RelativeSource={RelativeSource Mode=TemplatedParent},StringFormat={}{0:f1}}" FontSize="16" Width="46" TextAlignment="Center" Foreground="White"/>
  83. </Border>
  84. </Grid>
  85. </Grid>
  86. </Border>
  87. </ControlTemplate>
  88. </Setter.Value>
  89. </Setter>
  90. </Style>
  91. <LinearGradientBrush x:Key="NormalBackground" StartPoint="0.5,0" EndPoint="0.5,1">
  92. <GradientStopCollection>
  93. <GradientStop Color="White" />
  94. <GradientStop Color="#D0D0D0" Offset="0.5"/>
  95. <GradientStop Color="#E3E3E3" Offset="1"/>
  96. </GradientStopCollection>
  97. </LinearGradientBrush>
  98. <SolidColorBrush x:Key="AccentBrush" Color="#2B79E2"/>
  99. <SolidColorBrush x:Key="ControlBorderBrush" Color="LightGray"/>
  100. <SolidColorBrush x:Key="ControlBackground" Color="White"/>
  101. <SolidColorBrush x:Key="ControlForeground" Color="Black"/>
  102. <con:HalfNumberConverter x:Key="HalfNumber"/>
  103. <Style TargetType="{x:Type ctrl:SwitchButton}">
  104. <Setter Property="Background" Value="#00F4D5"/>
  105. <Setter Property="BorderBrush" Value="LightGray"/>
  106. <Setter Property="Template">
  107. <Setter.Value>
  108. <ControlTemplate TargetType="ctrl:SwitchButton">
  109. <Border CornerRadius="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=ActualHeight,Converter={StaticResource HalfNumber}}"
  110. BorderThickness="1" Background="{StaticResource ControlBackground}" BorderBrush="{TemplateBinding BorderBrush}">
  111. <Grid>
  112. <Ellipse x:Name="ELLIPSE" HorizontalAlignment="Left" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5"
  113. Fill="Gray" Stroke="{StaticResource ControlBorderBrush}" StrokeThickness="1">
  114. <Ellipse.RenderTransform>
  115. <TransformGroup>
  116. <TranslateTransform x:Name="TranslateX" X="2"/>
  117. </TransformGroup>
  118. </Ellipse.RenderTransform>
  119. </Ellipse>
  120. </Grid>
  121. </Border>
  122. </ControlTemplate>
  123. </Setter.Value>
  124. </Setter>
  125. </Style>
  126. </ResourceDictionary>