|
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:BPASmartClient.SCADAControl"
- xmlns:ctrl="clr-namespace:BPASmartClient.SCADAControl"
- xmlns:con="clr-namespace:BPASmartClient.SCADAControl.Converters">
- <!--<Style TargetType="{x:Type local:CustomControl1}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type local:CustomControl1}">
- <Border Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>-->
-
- <Style TargetType="{x:Type ctrl:ArcGauge}">
- <Setter Property="Background" Value="#646464"/>
- <Setter Property="Foreground" Value="Black"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ctrl:ArcGauge}">
- <Border Margin="10">
- <Grid Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}">
- <Ellipse Fill="#FF3B3B3B"/>
- <Grid RenderTransformOrigin="0.5,0.5" Margin="2">
- <Grid.RenderTransform>
- <TransformGroup>
- <RotateTransform Angle="{Binding Path=Angle,ElementName=PointRotate}"/>
- </TransformGroup>
- </Grid.RenderTransform>
- <Ellipse Width="16" Height="14" Fill="Orange" VerticalAlignment="Top" >
- <Ellipse.Effect>
- <BlurEffect Radius="12"/>
- </Ellipse.Effect>
- </Ellipse>
- </Grid>
-
- <Grid x:Name="bdGrid" Margin="12" UseLayoutRounding="True" ClipToBounds="True">
- <Ellipse>
- <Ellipse.Fill>
- <RadialGradientBrush>
- <GradientStop Color="#4D000000"/>
- </RadialGradientBrush>
- </Ellipse.Fill>
- </Ellipse>
-
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition Height="2*"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Ellipse Stroke="#464646" StrokeThickness="1" Grid.Column="1" Grid.Row="1"/>
- <Ellipse Stroke="#959595" Margin="4" StrokeThickness="6" Grid.Column="1" Grid.Row="1"/>
- <Ellipse Stroke="#464646" Margin="14" StrokeThickness="1" Grid.Column="1" Grid.Row="1"/>
- </Grid>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <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">
- <Path.RenderTransform>
- <TransformGroup>
- <RotateTransform x:Name="PointRotate"/>
- </TransformGroup>
- </Path.RenderTransform>
- </Path>
- </Grid>
-
- <Ellipse Width="28" Height="28" Fill="Black">
- <Ellipse.Effect>
- <DropShadowEffect Color="#0FA9CE" ShadowDepth="0" Direction="0" BlurRadius="16"/>
- </Ellipse.Effect>
- </Ellipse>
-
- <Border VerticalAlignment="Bottom" BorderBrush="#10ABD1" BorderThickness="2" Margin="0 0 0 12" Background="Black" Padding="4 2" HorizontalAlignment="Center">
- <TextBlock Text="{Binding Value,RelativeSource={RelativeSource Mode=TemplatedParent},StringFormat={}{0:f1}}" FontSize="16" Width="46" TextAlignment="Center" Foreground="White"/>
- </Border>
- </Grid>
- </Grid>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <LinearGradientBrush x:Key="NormalBackground" StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStopCollection>
- <GradientStop Color="White" />
- <GradientStop Color="#D0D0D0" Offset="0.5"/>
- <GradientStop Color="#E3E3E3" Offset="1"/>
- </GradientStopCollection>
- </LinearGradientBrush>
-
- <SolidColorBrush x:Key="AccentBrush" Color="#2B79E2"/>
- <SolidColorBrush x:Key="ControlBorderBrush" Color="LightGray"/>
- <SolidColorBrush x:Key="ControlBackground" Color="White"/>
- <SolidColorBrush x:Key="ControlForeground" Color="Black"/>
- <con:HalfNumberConverter x:Key="HalfNumber"/>
- <Style TargetType="{x:Type ctrl:SwitchButton}">
- <Setter Property="Background" Value="#00F4D5"/>
- <Setter Property="BorderBrush" Value="LightGray"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ctrl:SwitchButton">
- <Border CornerRadius="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=ActualHeight,Converter={StaticResource HalfNumber}}"
- BorderThickness="1" Background="{StaticResource ControlBackground}" BorderBrush="{TemplateBinding BorderBrush}">
- <Grid>
- <Ellipse x:Name="ELLIPSE" HorizontalAlignment="Left" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5"
- Fill="Gray" Stroke="{StaticResource ControlBorderBrush}" StrokeThickness="1">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <TranslateTransform x:Name="TranslateX" X="2"/>
- </TransformGroup>
- </Ellipse.RenderTransform>
- </Ellipse>
- </Grid>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- </ResourceDictionary>
|