-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
102 lines (78 loc) · 3.86 KB
/
MainWindow.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<Window x:Class="Microsoft.Samples.Kinect.BodyIndexBasics.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Kinect2Arff"
WindowState="Maximized"
Closing="MainWindow_Closing"
ResizeMode="NoResize">
<Window.Resources>
<Style TargetType="{x:Type Image}">
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
</Window.Resources>
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- ====== Main content: Kinect camera view ====== -->
<Viewbox Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Left" Margin="140 80 0 80">
<Image Source="{Binding ImageSource}" Stretch="UniformToFill" />
</Viewbox>
<!-- ====== Header ====== -->
<DockPanel Grid.Row="0" Grid.Column="1" Margin="40 60 0 0" >
<TextBlock Style="{StaticResource HeaderTextBlockStyle}">
<Bold Foreground="#FF387F37" >
<Run Text="Kinect2Arff" />
</Bold>
</TextBlock>
</DockPanel>
<!-- ====== Instructions text ====== -->
<TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource SubheaderTextBlockStyle}" Margin="40 180 0 0">
<Bold Foreground="Gray" FontSize="32">
<Run Text="Instructions:" />
</Bold>
</TextBlock>
<TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource SubheaderTextBlockStyle}" Margin="40 200 0 0" >
<LineBreak /> Make sure Kinect is tracking your entire body
<LineBreak /> (if you just see part of it, the record will not
<LineBreak /> work properly).
<LineBreak />
<LineBreak /> Press "Record" to start record a gesture.
<LineBreak />
<LineBreak /> Press "Save" to generate an Arff file with the
<LineBreak /> data, or "Back" to start over.
<LineBreak />
<LineBreak />
<LineBreak /> *the "Exit" button will work after the recording.
</TextBlock>
<!-- ====== Buttons ====== -->
<TextBlock Grid.Row="0" Grid.Column="1" VerticalAlignment="Bottom">
<Button x:Name="Button1" Grid.Row="1" Grid.Column="1" Style="{StaticResource SmallButton}"
Content="Record" Margin="40, -240, 0, 0" Click="Button1_Click" />
<Button x:Name="Button2" Grid.Row="0" Grid.Column="1" Style="{StaticResource SmallButton}"
Content="Exit" Margin="40, -240, 0, 0" Click="Button2_Click" />
</TextBlock>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
</Grid>
<!-- ====== Footer ====== -->
<StatusBar Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Name="statusBar" VerticalAlignment="Bottom" Background="White" Foreground="#ff6e6e6e">
<StatusBarItem Content="{Binding StatusText}" />
</StatusBar>
</Grid>
</Window>