-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
89 lines (77 loc) · 4.54 KB
/
Copy pathMainWindow.xaml
File metadata and controls
89 lines (77 loc) · 4.54 KB
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
<Window x:Class="Microsoft.Samples.Kinect.ContinuousGestureBasics.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Microsoft.Samples.Kinect.ContinuousGestureBasics"
Title="Continuous Gesture Basics"
Height="680" Width="790"
Loaded="MainWindow_Loaded"
Closing="MainWindow_Closing">
<Window.Resources>
<SolidColorBrush x:Key="MediumGreyBrush" Color="#ff6e6e6e" />
<SolidColorBrush x:Key="KinectPurpleBrush" Color="#ff52318f" />
<SolidColorBrush x:Key="KinectBlueBrush" Color="#ff00BCF2" />
</Window.Resources>
<Grid Margin="10 0 10 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="Images\Logo.png" HorizontalAlignment="Left" Stretch="Fill" Height="32" Width="81" Margin="0 10 0 5" />
<TextBlock Grid.Row="0" HorizontalAlignment="Right" Text="Continuous Gesture Basics" VerticalAlignment="Bottom" Margin="0 0 -1 0" Foreground="{StaticResource MediumGreyBrush}" FontFamily="Segoe UI" FontSize="18"/>
<Image Grid.Row="0" Source="Images\Status.png" Stretch="None" HorizontalAlignment="Center" Margin="0 0 0 5" />
<Grid x:Name="contentGrid" Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MinHeight="328.667"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Grid.Column="1" Grid.Row="0" Margin="5.333,5,5.333,5.667">
<TextBlock Text="Kinect Viewbox" FontSize="20" FontFamily="Segoe UI" Foreground="{StaticResource KinectPurpleBrush}" FontWeight="SemiBold" Grid.Row="0" Margin="5"/>
<Viewbox x:Name="kinectBodyViewbox">
<Image Source="{Binding ImageSource}" Stretch="UniformToFill" />
</Viewbox>
</StackPanel>
<Grid x:Name="gestureResultGrid" Grid.Column="0" Grid.Row="0" Width="Auto" Margin="5,5,4.667,0" VerticalAlignment="Top" Height="auto">
<Grid.Style>
<Style TargetType="{x:Type Grid}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsTracked}" Value="True">
<Setter Property="Background" Value="CornflowerBlue"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsTracked}" Value="False">
<Setter Property="Background" Value="LightGray"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Gesture Results" FontSize="20" FontFamily="Segoe UI" FontWeight="SemiBold" Foreground="{StaticResource KinectPurpleBrush}" Grid.Row="0" Margin="5"/>
<!--<TextBlock Text="{Binding TurnLeft, StringFormat='Turn Left: {0}'}" FontSize="18" FontFamily="Segoe UI" FontWeight="SemiBold" Grid.Row="1" Margin="5"/>
<TextBlock Text="{Binding TurnRight, StringFormat='Turn Right: {0}'}" FontSize="18" FontFamily="Segoe UI" FontWeight="SemiBold" Grid.Row="2" Margin="5"/>-->
<TextBlock Text="{Binding KeepStraight, StringFormat='Run: {0}'}" FontSize="18" FontFamily="Segoe UI" FontWeight="SemiBold" Grid.Row="3" Margin="5"/>
<TextBlock Text="{Binding JumpUp, StringFormat='Jump: {0}'}" FontSize="18" FontFamily="Segoe UI" FontWeight="SemiBold" Grid.Row="4" Margin="5"/>
<!--<TextBlock Text="{Binding KeepStraight, StringFormat='crouch: {0}'}" FontSize="18" FontFamily="Segoe UI" FontWeight="SemiBold" Grid.Row="5" Margin="5"/>
<TextBlock Text="{Binding KeepStraight, StringFormat='shoot: {0}'}" FontSize="18" FontFamily="Segoe UI" FontWeight="SemiBold" Grid.Row="6" Margin="5"/>
-->
</Grid>
<TextBlock Grid.ColumnSpan="2" Grid.Row="3" Text="Instructions: Control any game using the kinect sensor.Currently only jumping and running are supported" TextWrapping="Wrap" Margin="10,10.333,10.333,10" Foreground="{StaticResource MediumGreyBrush}" FontFamily="Segoe UI" FontSize="14"/>
</Grid>
<StatusBar Grid.Row="2" HorizontalAlignment="Stretch" Name="statusBar" VerticalAlignment="Bottom" Background="White" Foreground="{StaticResource KinectBlueBrush}">
<StatusBarItem Content="{Binding StatusText}" />
</StatusBar>
</Grid>
</Window>