-
Notifications
You must be signed in to change notification settings - Fork 6
/
FacePage.xaml
168 lines (163 loc) · 9.94 KB
/
FacePage.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<Page
x:Class="ComputerVision.UWP.FacePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ComputerVision.UWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Padding="10,14,0,14" Background="{ThemeResource SystemControlForegroundChromeMediumBrush}"
>
<TextBlock Text="Face Analysis" FontSize="16"></TextBlock>
</StackPanel>
<RelativePanel Name="spMain" Grid.Row="1">
<Image Name="imgPhoto"
RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignTopWithPanel="True"
RelativePanel.AlignBottomWithPanel="True"
ImageOpened="imgPhoto_ImageOpened"
Tapped="cvasMain_Tapped"
Stretch="Uniform">
</Image>
<Canvas Name="cvasMain" RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignTopWithPanel="True"
RelativePanel.AlignBottomWithPanel="True"
SizeChanged="cvasMain_SizeChanged"
Tapped="cvasMain_Tapped"
>
<Popup Name="emotionData" IsOpen="False" IsLightDismissEnabled="True">
</Popup>
</Canvas>
</RelativePanel>
<ProgressRing Name="ringLoading" Grid.Row="1" Width="60" Height="60">
</ProgressRing>
<Pivot Grid.Row="2" Padding="1,1,1,10">
<Pivot.Items>
<PivotItem>
<PivotItem.Header>
<TextBlock FontSize="16">Faces</TextBlock>
</PivotItem.Header>
<PivotItem.Content>
<Grid Name="gridFaces">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="62"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="72"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="#" Grid.Row="0" Grid.Column="0" Padding="1"></TextBlock>
<TextBlock Text="Age" Grid.Row="0" Grid.Column="1" Padding="1"></TextBlock>
<TextBlock Text="Sex" Grid.Row="0" Grid.Column="2" Padding="1"></TextBlock>
<TextBlock Text="Smile" Grid.Row="0" Grid.Column="3" Padding="1"></TextBlock>
<TextBlock Text="Glass" Grid.Row="0" Grid.Column="4" Padding="1"></TextBlock>
<Border Grid.Row="1" Grid.ColumnSpan="5" Height="0.5" Background="White" Margin="0,5,0,5"></Border>
</Grid>
</PivotItem.Content>
</PivotItem>
<PivotItem>
<PivotItem.Header>
<TextBlock FontSize="16">Emotions</TextBlock>
</PivotItem.Header>
<PivotItem.Content>
<Grid Name="gridEmotions">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="18"></ColumnDefinition>
<ColumnDefinition Width="0.8*"></ColumnDefinition>
<ColumnDefinition Width="1.25*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="0.6*"></ColumnDefinition>
<ColumnDefinition Width="1.3*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="1.05*"></ColumnDefinition>
<ColumnDefinition Width="1.05*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock FontSize="11" Text="#" Grid.Row="0" Grid.Column="0" Padding="1"></TextBlock>
<TextBlock FontSize="11" Text="anger" Grid.Row="0" Grid.Column="1"></TextBlock>
<TextBlock FontSize="11" Text="contempt" Grid.Row="0" Grid.Column="2"></TextBlock>
<TextBlock FontSize="11" Text="disgust" Grid.Row="0" Grid.Column="3"></TextBlock>
<TextBlock FontSize="11" Text="fear" Grid.Row="0" Grid.Column="4"></TextBlock>
<TextBlock FontSize="11" Text="happiness" Grid.Row="0" Grid.Column="5"></TextBlock>
<TextBlock FontSize="11" Text="neutral" Grid.Row="0" Grid.Column="6"></TextBlock>
<TextBlock FontSize="11" Text="sadness" Grid.Row="0" Grid.Column="7"></TextBlock>
<TextBlock FontSize="11" Text="surprise" Grid.Row="0" Grid.Column="8"></TextBlock>
<Border Grid.Row="1" Grid.ColumnSpan="9" Background="White" Height="0.5" Margin="0,5,0,5"></Border>
</Grid>
</PivotItem.Content>
</PivotItem>
</Pivot.Items>
</Pivot>
<RelativePanel Grid.Row="3" BorderThickness="0.5" BorderBrush="{ThemeResource SystemControlForegroundChromeMediumBrush}" >
<TextBlock VerticalAlignment="Center"
Text="Camera/Album/Photo URL"
Padding="14,0,0,0"
Name="txtLocation"
RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignBottomWithPanel="True"
RelativePanel.AlignTopWithPanel="True"
FontSize="16">
</TextBlock>
<Button Name="btnSubmit"
RelativePanel.AlignRightWithPanel="True">
<Button.Content>
<TextBlock Text="Analyse" FontSize="16" Margin="4">
</TextBlock>
</Button.Content>
<Button.Flyout>
<MenuFlyout>
<MenuFlyoutItem Text="From Camera" Click="MenuFlyoutItem_Click">
</MenuFlyoutItem>
<MenuFlyoutItem Text="From Album" Click="MenuFlyoutItem_Click">
</MenuFlyoutItem>
<MenuFlyoutItem Text="From URL" Click="MenuFlyoutItem_Click">
</MenuFlyoutItem>
</MenuFlyout>
</Button.Flyout>
</Button>
</RelativePanel>
</Grid>
</Page>