-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
102 lines (99 loc) · 7.62 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
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="Microsoft.Samples.Kinect.InfraredBasics.MainWindow"
Title="Infrared Basics"
Height="599" Width="700"
Closing="MainWindow_Closing">
<Window.Resources>
<SolidColorBrush x:Key="MediumGreyBrush" Color="#ff6e6e6e" />
<SolidColorBrush x:Key="KinectPurpleBrush" Color="#ff52318f" />
<SolidColorBrush x:Key="KinectBlueBrush" Color="#ff00BCF2" />
<Style TargetType="{x:Type Image}">
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style TargetType="{x:Type Button}" x:Key="ScreenshotButton" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<StackPanel Orientation="Horizontal" Background="Transparent">
<TextBlock x:Name="ScreenshotText" Text="{TemplateBinding Content}" TextAlignment="Left" VerticalAlignment="Center" Foreground="{StaticResource KinectPurpleBrush}" FontSize="15" />
<Grid Margin="9,0,0,0">
<Image x:Name="ScreenshotNormal" Source="Images\ScreenshotNormal.png" Stretch="None" HorizontalAlignment="Center" />
<Image x:Name="ScreenshotHover" Source="Images\ScreenshotHover.png" Stretch="None" HorizontalAlignment="Center" Visibility="Collapsed" />
</Grid>
</StackPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Visibility" Value="Collapsed" TargetName="ScreenshotNormal" />
<Setter Property="Visibility" Value="Visible" TargetName="ScreenshotHover" />
<Setter Property="Foreground" Value="{StaticResource KinectBlueBrush}" TargetName="ScreenshotText" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<System:Double x:Key="StatusWidth">NaN</System:Double>
</Window.Resources>
<Grid Margin="9,0,10.6,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="Images\Logo.png" HorizontalAlignment="Left" Stretch="Fill" Height="32" Width="81" Margin="0" />
<Image Grid.Row="0" Source="Images\Status.png" Stretch="None" HorizontalAlignment="Center" Margin="0" />
<Border Grid.Row="0" HorizontalAlignment="Right" Height="20" Margin="0,0,8,0" VerticalAlignment="Center" CornerRadius="3" BorderThickness="2" BorderBrush="#FFAEAEAE" Padding="2">
<StackPanel Orientation="Horizontal" >
<Label x:Name="label" Content="Active Spells:" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontFamily="Arial" Padding="0,0,5,0" Margin="0,0,0,-0.2"/>
<TextBlock x:Name="spellsText" HorizontalAlignment="Left" Margin="0,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" Padding="0,0,0,0"><Run Text="Text"/></TextBlock>
</StackPanel>
</Border>
<StackPanel Margin="0,0.4,0,0.2" Grid.Row="1" Orientation="Horizontal">
<Viewbox HorizontalAlignment="Left">
<Image Source="{Binding ImageSource}" Stretch="UniformToFill" />
</Viewbox>
<StackPanel Margin="8,0,0,0">
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left">
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Myanmar Text" FontSize="24" Text="ROBOT STATUS:" Margin="0,0,0,-0.2" Width="NaN"/>
<Border HorizontalAlignment="Left" VerticalAlignment="Center" BorderBrush="#FF8C8C8C" BorderThickness="4" CornerRadius="14" Padding="10" Margin="10">
<TextBlock x:Name="robotStatus" TextWrapping="Wrap" Margin="0,0,0,-8" FontFamily="Myanmar Text" FontSize="24" VerticalAlignment="Center" Text=""/>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left">
<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Myanmar Text" FontSize="24" Margin="0,0,0,-0.2"><Run Text="CAST SPELL"/><Run Text=":"/></TextBlock>
<Border HorizontalAlignment="Left" VerticalAlignment="Center" BorderBrush="#FF8C8C8C" BorderThickness="4" CornerRadius="14" Padding="10" Margin="10">
<TextBlock x:Name="castSpell" TextWrapping="Wrap" Margin="0,0,0,-8" FontFamily="Myanmar Text" FontSize="24" VerticalAlignment="Center"><Run Text="WINGARDIUM LEVIOSA"/></TextBlock>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left">
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Myanmar Text" FontSize="24" Margin="0,0,0,-0.2" Width="NaN" Text="TIME REMAINING:"/>
<Border HorizontalAlignment="Left" VerticalAlignment="Center" BorderBrush="#FFFF1F1F" BorderThickness="4" CornerRadius="14" Padding="10" Margin="10">
<TextBlock x:Name="timeRemaining" TextWrapping="Wrap" Margin="0,0,0,-8" FontFamily="Myanmar Text" FontSize="24" VerticalAlignment="Center"><Run Text="WINGARDIUM LEVIOSA"/></TextBlock>
</Border>
</StackPanel>
</StackPanel>
</StackPanel>
<DockPanel Grid.Row="3" Margin="0,4,0,24" >
<CheckBox x:Name="checkBox" Content="Enrich the Magicks Forthwidth" HorizontalAlignment="Left" Margin="0,2" VerticalAlignment="Center" Height="16"/>
<Label Content="Move to:" Height="25.6" VerticalAlignment="Top" Margin="13,0,0,0"/>
<ComboBox x:Name="GrabControlOption" Height="22.4" VerticalAlignment="Top" Width="120" HorizontalAlignment="Left" Margin="0">
<ComboBoxItem Content="Grab #1" Tag="Level_One" IsSelected="True"/>
<ComboBoxItem Content="Grab #2" Tag="Level_Two"/>
<ComboBoxItem Content="Grab #3" Tag="Level_Three"/>
</ComboBox>
<Button x:Name="GrabControlButton" Content="Go" Width="34" Margin="6,0,0,3.6" Click="GrabControlButton_Click"/>
<StackPanel Height="16" Margin="0,2" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Right">
<CheckBox x:Name="captureSpellOption" Content="Capture Spell:" Margin="0" Width="94" VerticalAlignment="Center"/>
<TextBox x:Name="spellNameBox" TextWrapping="Wrap" Width="125" Margin="0" MaxLines="5" VerticalAlignment="Center"/>
</StackPanel>
</DockPanel>
<StatusBar Grid.Row="4" HorizontalAlignment="Stretch" x:Name="statusBar" VerticalAlignment="Bottom" Background="White" Foreground="{StaticResource MediumGreyBrush}">
<StatusBarItem Content="{Binding StatusText}" VerticalAlignment="Bottom" Height="22" />
</StatusBar>
</Grid>
</Window>