forked from nefarius/ScpToolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DpadAxisControl.xaml
82 lines (76 loc) · 2.91 KB
/
DpadAxisControl.xaml
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
<UserControl x:Class="ScpProfiler.DpadAxisControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="150" d:DesignWidth="150" MinHeight="150" MinWidth="150"
ToolTip="D-Pad axis">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<!-- D-Pad left -->
<ProgressBar Grid.Row="1" Grid.Column="0"
Value="30"
Height="10"
Width="40"
RenderTransformOrigin="0.5,0.5">
<ProgressBar.RenderTransform>
<TransformGroup>
<ScaleTransform />
<SkewTransform />
<RotateTransform Angle="-180" />
<TranslateTransform />
</TransformGroup>
</ProgressBar.RenderTransform>
</ProgressBar>
<!-- D-Pad up -->
<ProgressBar Grid.Row="0" Grid.Column="1"
Value="30"
Height="10"
Width="40"
RenderTransformOrigin="0.5,0.5">
<ProgressBar.RenderTransform>
<TransformGroup>
<ScaleTransform />
<SkewTransform />
<RotateTransform Angle="-90" />
<TranslateTransform />
</TransformGroup>
</ProgressBar.RenderTransform>
</ProgressBar>
<!-- D-Pad right -->
<ProgressBar Grid.Row="1" Grid.Column="2"
Value="30"
Height="10"
Width="40"
RenderTransformOrigin="0.5,0.5"/>
<!-- D-Pad down -->
<ProgressBar Grid.Row="2" Grid.Column="1"
Value="30"
Height="10"
Width="40"
RenderTransformOrigin="0.5,0.5">
<ProgressBar.RenderTransform>
<TransformGroup>
<ScaleTransform />
<SkewTransform />
<RotateTransform Angle="90" />
<TranslateTransform />
</TransformGroup>
</ProgressBar.RenderTransform>
</ProgressBar>
<!-- D-Pad center -->
<Image Grid.Row="1" Grid.Column="1"
Source="Icons/48px-PS3_Dpad.png"
Stretch="None" />
</Grid>
</UserControl>