-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
95 lines (88 loc) · 6.17 KB
/
MainPage.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
<!--
Copyright(c) Microsoft Open Technologies, Inc. All rights reserved.
The MIT License(MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<Page
x:Class="open360cam.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:open360cam"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="#FD9B09">
<Grid.ChildrenTransitions>
<TransitionCollection>
<EntranceThemeTransition/>
</TransitionCollection>
</Grid.ChildrenTransitions>
<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 Grid.Row="0" FontWeight="Bold" x:Name="pageTitle" Text="open360 camera app" Style="{StaticResource HeaderTextBlockStyle}"
IsHitTestVisible="false" TextWrapping="NoWrap" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<StackPanel Grid.Row="1" x:Name="ContentRoot" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,10,0,0">
<Button x:Name="video_init" Content="Initialize Camera" Click="initVideo_Click" HorizontalAlignment="Left" Margin="30,0,30,0" Width="180"/>
<Button x:Name="cleanup" Content="Close Camera" Click="cleanup_Click" Margin="30,0,30,0" Width="180"/>
</StackPanel>
<StackPanel Grid.Row="2" x:Name="ContentRootActions" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,0">
<Button x:Name="takePhoto" Content="Take Photo" Click="takePhoto_Click" Margin="0,20,0,0" Width="120" IsEnabled="False" Visibility="Collapsed"/>
</StackPanel>
<StackPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,10">
<StackPanel>
<TextBlock Name="PreviewTitle" Grid.Row="0" Grid.Column="0" Text="Preview" Height="30" HorizontalAlignment="Center" Margin="0,20,0,0" Visibility="Visible"/>
<Canvas Name="PreviewCanvas" Grid.Row="1" Grid.Column="0" Width="200" Height="200" Background="Gray" Margin="0,0,0,0" Visibility="Visible">
<CaptureElement x:Name="previewElement" Width="200" Height="200" HorizontalAlignment="Left" Visibility="Visible"/>
</Canvas>
</StackPanel>
<StackPanel>
<TextBlock Name="PreviewTitle2" Grid.Row="0" Grid.Column="0" Text="Preview 2" Height="30" HorizontalAlignment="Center" Margin="0,20,0,0" Visibility="Visible"/>
<Canvas Name="PreviewCanvas2" Grid.Row="1" Grid.Column="0" Width="200" Height="200" Background="Gray" Margin="0,0,0,0" Visibility="Visible">
<CaptureElement x:Name="previewElement2" Width="200" Height="200" HorizontalAlignment="Left" Visibility="Visible"/>
</Canvas>
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,10">
<StackPanel>
<TextBlock Name="ImageTitle" Grid.Row="0" Grid.Column="1" Text="Last captured photo" Height="30" HorizontalAlignment="Center" Margin="0,20,0,0" Visibility="Visible"/>
<Canvas Name="PhotoCanvas" Grid.Row="1" Grid.Column="1" Width="200" Height="200" Background="Gray" Margin="0,0,0,0" Visibility="Visible">
<Image x:Name="captureImage" Width="200" Height="200" Visibility="Visible"/>
</Canvas>
</StackPanel>
<StackPanel>
<TextBlock Name="ImageTitle2" Grid.Row="0" Grid.Column="1" Text="Last captured photo 2" Height="30" HorizontalAlignment="Center" Margin="0,20,0,0" Visibility="Visible"/>
<Canvas Name="PhotoCanvas2" Grid.Row="1" Grid.Column="1" Width="200" Height="200" Background="Gray" Margin="0,0,0,0" Visibility="Visible">
<Image x:Name="captureImage2" Width="200" Height="200" Visibility="Visible"/>
</Canvas>
</StackPanel>
</StackPanel>
<TextBlock Grid.Row="5" FontWeight="Bold" Text="status" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,0,0,0"/>
<ScrollViewer x:Name="statusScroller" Grid.Row="6" Margin="12,10,12,0" HorizontalAlignment="Center" VerticalAlignment="Center" >
<TextBox
TextChanged="TextBox_TextChanged"
x:Name="status" TextWrapping="Wrap" IsReadOnly="True" Height="300" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto"/>
</ScrollViewer>
</Grid>
</Page>