blob: 6d50c49699173ed1ba8c8cdea4af9c702bda7ba2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:realTimeGraphX="clr-namespace:RealTimeGraphX.WPF;assembly=RealTimeGraphX.WPF"
xmlns:local="clr-namespace:Tango.PPC.UI.Graphs">
<BitmapImage x:Key="PPC_Screw" UriSource="../Images/screw.png" />
<Style TargetType="{x:Type local:RealTimeGraph}">
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource Tango_RealTimeGraph_OuterBorderBrush}"></Setter>
<Setter Property="Padding" Value="20 20 30 20"></Setter>
<Setter Property="FontSize" Value="11"></Setter>
<Setter Property="Foreground" Value="{StaticResource Tango_RealTimeGraph_ForegroundBrush}"></Setter>
<Setter Property="Background" Value="{StaticResource Tango_RealTimeGraph_BackgroundBrush}"></Setter>
<Setter Property="GridLinesBrush" Value="{StaticResource Tango_RealTimeGraph_GridLinesBrush}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:RealTimeGraph}">
<Grid>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5"
Padding="{TemplateBinding Padding}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="1">
<realTimeGraphX:WpfGraphGridLines Controller="{TemplateBinding Controller}" Foreground="{TemplateBinding GridLinesBrush}" />
<realTimeGraphX:WpfGraphSurface x:Name="surface" Controller="{TemplateBinding Controller}" BorderThickness="1 0 0 1" BorderBrush="{StaticResource Tango_RealTimeGraph_InnerBorderBrush}" />
</Grid>
<realTimeGraphX:WpfGraphAxisControl Width="70" Visibility="{TemplateBinding VerticalAxisVisibility}" Orientation="Vertical" Controller="{TemplateBinding Controller}" StringFormat="{TemplateBinding StringFormat}" Ticks="{TemplateBinding VerticalTicks}" />
<realTimeGraphX:WpfGraphAxisControl Height="35" Visibility="{TemplateBinding HorizontalAxisVisibility}" Orientation="Horizontal" Controller="{TemplateBinding Controller}" Grid.Column="1" Grid.Row="1" Ticks="{TemplateBinding HorizontalTicks}" StringFormat="hh\:mm\:ss"/>
</Grid>
</Border>
<Image HorizontalAlignment="Left" VerticalAlignment="Top" Margin="8" Source="{StaticResource PPC_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="10" Height="10" />
<Image HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8" Source="{StaticResource PPC_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="10" Height="10" />
<Image HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="8" Source="{StaticResource PPC_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="10" Height="10" />
<Image HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="8" Source="{StaticResource PPC_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="10" Height="10" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type local:RealTimeGraph}" x:Key="PPC_RealTimeGraph_Flat">
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource Tango_RealTimeGraph_OuterBorderBrush}"></Setter>
<Setter Property="Padding" Value="0"></Setter>
<Setter Property="FontSize" Value="11"></Setter>
<Setter Property="Foreground" Value="{StaticResource Tango_RealTimeGraph_ForegroundBrush}"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="GridLinesBrush" Value="{StaticResource Tango_RealTimeGraph_GridLinesBrush}"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:RealTimeGraph}">
<Grid>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="1" ClipToBounds="True">
<realTimeGraphX:WpfGraphGridLines Controller="{TemplateBinding Controller}" Foreground="{TemplateBinding GridLinesBrush}" Rows="5" Columns="0"/>
<realTimeGraphX:WpfGraphSurface Margin="-2 0 0 0" x:Name="surface" Controller="{TemplateBinding Controller}" BorderThickness="0 0 0 0" BorderBrush="{StaticResource Tango_RealTimeGraph_InnerBorderBrush}" />
</Grid>
<realTimeGraphX:WpfGraphAxisControl Width="30" Visibility="{TemplateBinding VerticalAxisVisibility}" Orientation="Vertical" Controller="{TemplateBinding Controller}" StringFormat="{TemplateBinding StringFormat}" Ticks="{TemplateBinding VerticalTicks}" />
<realTimeGraphX:WpfGraphAxisControl Height="38" Visibility="{TemplateBinding HorizontalAxisVisibility}" Orientation="Horizontal" Controller="{TemplateBinding Controller}" Grid.Column="1" Grid.Row="1" Ticks="{TemplateBinding HorizontalTicks}" StringFormat="hh\:mm" AxisLabelAngle="{TemplateBinding AxisLabelAngle}"/>
</Grid>
</Border>
<Viewbox IsHitTestVisible="False" Stretch="Uniform" Margin="{TemplateBinding CurrentValueMargin}" Visibility="{TemplateBinding CurrentValueVisibility}">
<Grid Width="200" Height="200">
<!--<Ellipse Stroke="#38FFFFFF" StrokeThickness="20" />-->
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Opacity="0.8" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold" FontSize="{TemplateBinding CurrentValueFontSize}" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=Controller.DataSeriesCollection[0].CurrentValue}"></TextBlock>
</StackPanel>
</Grid>
</Viewbox>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|