2 //*********************************************************
4 // Copyright (c) Microsoft. All rights reserved.
5 // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
10 //*********************************************************
13 <common:LayoutAwarePage
14 x:Class="SDKSample.MainPage"
15 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
16 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
17 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
18 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
19 xmlns:common="using:SDKSample.Common"
23 <common:LayoutAwarePage.Resources>
24 <Style x:Key="BaseStatusStyle" TargetType="TextBlock">
25 <Setter Property="FontFamily" Value="Segoe UI Semilight"/>
26 <Setter Property="FontSize" Value="14.667"/>
27 <Setter Property="Margin" Value="0,0,0,5"/>
29 <Style x:Key="StatusStyle" BasedOn="{StaticResource BaseStatusStyle}" TargetType="TextBlock">
30 <Setter Property="Foreground" Value="Green"/>
32 <Style x:Key="ErrorStyle" BasedOn="{StaticResource BaseStatusStyle}" TargetType="TextBlock">
33 <Setter Property="Foreground" Value="Blue"/>
35 </common:LayoutAwarePage.Resources>
38 <Grid x:Name="LayoutRoot" Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
40 <Grid x:Name="ContentRoot" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Margin="100,20,100,20">
42 <RowDefinition Height="Auto"/>
43 <RowDefinition Height="*"/>
44 <RowDefinition Height="Auto"/>
45 </Grid.RowDefinitions>
48 <StackPanel Orientation="Horizontal" Grid.Row="0">
49 <Image x:Name="WindowsLogo" Stretch="None" Source="Assets/windows-sdk.png" AutomationProperties.Name="Windows Logo" HorizontalAlignment="Left" Grid.Column="0"/>
50 <TextBlock VerticalAlignment="Bottom" Style="{StaticResource TitleTextStyle}" TextWrapping="Wrap" Grid.Column="1" Text="OpenCV for Windows RT"/>
52 <ScrollViewer x:Name="MainScrollViewer" Grid.Row="1" ZoomMode="Disabled" IsTabStop="False" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Padding="0,0,0,20" >
55 <RowDefinition Height="Auto"/>
56 <RowDefinition Height="*"/>
57 </Grid.RowDefinitions>
58 <TextBlock x:Name="FeatureName" Grid.Row="0" Text="Add Sample Title Here" Style="{StaticResource HeaderTextStyle}" TextWrapping="Wrap"/>
63 <!-- All XAML in this section is purely for design time so you can see sample content in the designer. -->
64 <!-- This will be repaced at runtime by live content. -->
67 <RowDefinition Height="Auto"/>
68 <RowDefinition Height="Auto"/>
69 <RowDefinition Height="Auto"/>
70 <RowDefinition Height="Auto"/>
71 <RowDefinition Height="Auto"/>
72 <RowDefinition Height="Auto"/>
73 <RowDefinition Height="Auto"/>
74 <RowDefinition Height="*"/>
75 </Grid.RowDefinitions>
76 <Grid.ColumnDefinitions>
77 <ColumnDefinition Width="Auto"/>
78 <ColumnDefinition Width="*"/>
79 </Grid.ColumnDefinitions>
80 <TextBlock Grid.Row="0" Text="Input" Style="{StaticResource H2Style}"/>
82 <TextBlock x:Name="ScenarioListLabel" Text="Select Scenario:" Grid.Row="1" Style="{StaticResource SubheaderTextStyle}" Margin="0,5,0,0" />
83 <ListBox x:Name="Scenarios" Margin="0,0,20,0" Grid.Row="2" AutomationProperties.Name="Scenarios" HorizontalAlignment="Left"
84 VerticalAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Auto"
85 AutomationProperties.LabeledBy="{Binding ElementName=ScenarioListLabel}" MaxHeight="125">
86 <ListBox.ItemTemplate>
88 <TextBlock Text="{Binding Name}"/>
90 </ListBox.ItemTemplate>
92 <TextBlock x:Name="DescriptionText" Margin="0,5,0,0" Text="Description:" Style="{StaticResource SubheaderTextStyle}" Grid.Row="1" Grid.Column="1"/>
93 <!-- Input Scenarios -->
94 <UserControl x:Name="InputSection" Margin="0,5,0,0" IsTabStop="False" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top"/>
96 <!-- Output section -->
97 <TextBlock Text="Output" Grid.Row="5" Margin="0,25,0,20" Style="{StaticResource H2Style}" Grid.ColumnSpan="2"/>
98 <TextBlock x:Name="StatusBlock" Grid.Row="6" Margin="0,0,0,5" Grid.ColumnSpan="2"/>
100 <!-- Output Scenarios -->
101 <UserControl x:Name="OutputSection" Grid.Row="7" Grid.ColumnSpan="2" BorderThickness="0"/>
108 <Grid x:Name="Footer" Grid.Row="3" Margin="0,10,0,10" VerticalAlignment="Bottom" >
109 <Grid.RowDefinitions>
110 <RowDefinition Height="Auto"/>
111 <RowDefinition Height="Auto"/>
112 <RowDefinition Height="Auto"/>
113 </Grid.RowDefinitions>
115 <Grid.ColumnDefinitions>
116 <ColumnDefinition Width="Auto"/>
117 <ColumnDefinition Width="*"/>
118 </Grid.ColumnDefinitions>
119 <StackPanel x:Name="FooterPanel" Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right"/>
125 <VisualStateManager.VisualStateGroups>
126 <!-- Visual states reflect the application's view state -->
128 <VisualState x:Name="FullScreenLandscape">
132 <VisualState x:Name="Filled">
137 <VisualState x:Name="FullScreenPortrait">
142 <VisualState x:Name="Snapped">
144 <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="ContentRoot">
145 <DiscreteObjectKeyFrame KeyTime="0">
146 <DiscreteObjectKeyFrame.Value>
147 <Thickness>20,20,20,20</Thickness>
148 </DiscreteObjectKeyFrame.Value>
149 </DiscreteObjectKeyFrame>
150 </ObjectAnimationUsingKeyFrames>
154 </VisualStateManager.VisualStateGroups>
156 </common:LayoutAwarePage>