aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Themes/Generic.xaml
blob: 88d22f9e27cf7cd6840cc27db202138e14501728 (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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:RealTimeGraphX.WPF">

    <Style TargetType="{x:Type local:WpfGraphSurface}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:WpfGraphSurface}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="PART_Grid" Margin="{TemplateBinding Padding}">
                            <Image Source="{TemplateBinding Image}" Stretch="None"></Image>

                            <Canvas x:Name="PART_SelectionCanvas" Background="Transparent">
                                <Rectangle x:Name="PART_SelectionRectangle" Fill="#7BFFFFFF" Canvas.Top="0" Canvas.Left="0" Width="0" Height="0" Visibility="Hidden"></Rectangle>
                            </Canvas>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:WpfGraphAxisControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:WpfGraphAxisControl}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">

                        <ItemsControl x:Name="PART_ItemsControl" ItemsSource="{TemplateBinding Items}" ItemTemplate="{TemplateBinding ItemTemplate}">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <local:WpfGraphAxisPanel x:Name="PART_AxisPanel" Orientation="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphAxisControl},Path=Orientation}"></local:WpfGraphAxisPanel>
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                        </ItemsControl>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="ItemTemplate">
                    <Setter.Value>
                        <DataTemplate DataType="{x:Type local:WpfGraphAxisTickData}">
                            <DockPanel VerticalAlignment="Top">
                                <Rectangle DockPanel.Dock="Right" VerticalAlignment="Center" Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphAxisControl},Path=Foreground}" StrokeThickness="1">
                                    <Rectangle.Style>
                                        <Style TargetType="Rectangle">
                                            <Setter Property="Width" Value="4"></Setter>
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding IsEven}" Value="True">
                                                    <Setter Property="Width" Value="6"></Setter>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Rectangle.Style>
                                </Rectangle>
                                <TextBlock Text="{Binding DisplayText}"></TextBlock>
                            </DockPanel>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="ItemTemplate">
                    <Setter.Value>
                        <DataTemplate DataType="{x:Type local:WpfGraphAxisTickData}">
                            <DockPanel HorizontalAlignment="Left">
                                <Rectangle DockPanel.Dock="Top" HorizontalAlignment="Center" Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphAxisControl},Path=Foreground}" StrokeThickness="1">
                                    <Rectangle.Style>
                                        <Style TargetType="Rectangle">
                                            <Setter Property="Height" Value="4"></Setter>
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding IsEven}" Value="True">
                                                    <Setter Property="Height" Value="6"></Setter>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Rectangle.Style>
                                </Rectangle>
                                <TextBlock VerticalAlignment="Bottom" Text="{Binding DisplayText}" RenderTransformOrigin="0.5,0.5">
                                    <TextBlock.RenderTransform>
                                        <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphAxisControl}, Path=AxisLabelAngle}" />
                                    </TextBlock.RenderTransform>
                                </TextBlock>
                            </DockPanel>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type local:WpfGraphGridLines}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:WpfGraphGridLines}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">

                        <Grid>
                            <ItemsControl ItemsSource="{TemplateBinding HorizontalItems}">
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <UniformGrid Columns="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphGridLines},Path=Columns}"></UniformGrid>
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <Rectangle Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphGridLines},Path=Foreground}" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Stretch"></Rectangle>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>

                            <ItemsControl ItemsSource="{TemplateBinding VerticalItems}">
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <UniformGrid Rows="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphGridLines},Path=Rows}"></UniformGrid>
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <Rectangle Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphGridLines},Path=Foreground}" StrokeThickness="1" HorizontalAlignment="Stretch" VerticalAlignment="Top"></Rectangle>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>

                            <Rectangle Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphGridLines},Path=Foreground}" StrokeThickness="1" HorizontalAlignment="Right" VerticalAlignment="Stretch"></Rectangle>
                            <Rectangle Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphGridLines},Path=Foreground}" StrokeThickness="1" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"></Rectangle>
                        </Grid>

                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>