Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2497 - 1
<UserControl x:Class="MKLiveView.ArtificialHorizon.ArtificialHorizon"
2
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6
             xmlns:local="clr-namespace:MKLiveView.ArtificialHorizon"
7
             mc:Ignorable="d" Height="240" Width="240"
8
             DataContext="{Binding RelativeSource={RelativeSource Self}}">
9
    <Grid>
10
        <Image Margin="0,0,0,0">
11
            <Image.Source>
12
                <DrawingImage>
13
                    <DrawingImage.Drawing>
14
                        <DrawingGroup>
15
                            <DrawingGroup>
16
                                <DrawingGroup>
17
                                    <DrawingGroup.Transform>
18
                                        <TransformGroup>
19
                                            <RotateTransform x:Name="RollAngle" Angle="{Binding Roll, UpdateSourceTrigger=PropertyChanged}" CenterX="120" CenterY="120" />
20
                                            <TranslateTransform x:Name="PitchAngle" Y="{Binding Pitch, UpdateSourceTrigger=PropertyChanged}" />
21
                                        </TransformGroup>
22
                                    </DrawingGroup.Transform>
23
 
24
                                    <ImageDrawing ImageSource="horizon.png" Rect="0,0,240,240" />
25
                                </DrawingGroup>
26
 
27
                                <DrawingGroup.ClipGeometry>
28
                                    <EllipseGeometry Center="120,120" RadiusX="60" RadiusY="60">
29
                                    </EllipseGeometry>
30
                                </DrawingGroup.ClipGeometry>
31
                            </DrawingGroup>
32
 
33
                            <DrawingGroup>
34
                                <ImageDrawing ImageSource="Scale.png" Rect="0,0,240,240" />
35
                                <ImageDrawing ImageSource="Wings.png" Rect="0,0,240,240" />
36
                            </DrawingGroup>
37
                            <DrawingGroup>
38
                                <DrawingGroup>
39
                                    <ImageDrawing ImageSource="Home.png" Rect="0,0,240,240" />
40
 
41
                                    <DrawingGroup.Transform>
42
                                        <TransformGroup>
43
                                            <RotateTransform x:Name="RotateHome" Angle="0" CenterX="120" CenterY="120" />
44
                                        </TransformGroup>
45
                                    </DrawingGroup.Transform>
46
                                </DrawingGroup>
47
                                <DrawingGroup>
48
                                    <ImageDrawing ImageSource="Heading1.png" Rect="0,0,240,240" />
49
 
50
                                    <DrawingGroup.Transform>
51
                                        <TransformGroup>
52
                                            <RotateTransform x:Name="Rotate" Angle="0" CenterX="120" CenterY="120" />
53
                                        </TransformGroup>
54
                                    </DrawingGroup.Transform>
55
                                </DrawingGroup>
56
 
57
                            </DrawingGroup>
58
                            <DrawingGroup.ClipGeometry>
59
                                <EllipseGeometry Center="120,120" RadiusX="120" RadiusY="120">
60
                                </EllipseGeometry>
61
                            </DrawingGroup.ClipGeometry>
62
                       </DrawingGroup>
63
                    </DrawingImage.Drawing>
64
                </DrawingImage>
65
            </Image.Source>
66
        </Image>
67
    </Grid>
68
</UserControl>