MainPage.xaml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <!--
  2. //*********************************************************
  3. //
  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.
  9. //
  10. //*********************************************************
  11. -->
  12. <common:LayoutAwarePage
  13. x:Class="SDKSample.MainPage"
  14. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  15. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  16. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  17. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  18. xmlns:common="using:SDKSample.Common"
  19. mc:Ignorable="d"
  20. x:Name="RootPage">
  21. <common:LayoutAwarePage.Resources>
  22. <Style x:Key="BaseStatusStyle" TargetType="TextBlock">
  23. <Setter Property="FontFamily" Value="Segoe UI Semilight"/>
  24. <Setter Property="FontSize" Value="14.667"/>
  25. <Setter Property="Margin" Value="0,0,0,5"/>
  26. </Style>
  27. <Style x:Key="StatusStyle" BasedOn="{StaticResource BaseStatusStyle}" TargetType="TextBlock">
  28. <Setter Property="Foreground" Value="Green"/>
  29. </Style>
  30. <Style x:Key="ErrorStyle" BasedOn="{StaticResource BaseStatusStyle}" TargetType="TextBlock">
  31. <Setter Property="Foreground" Value="Blue"/>
  32. </Style>
  33. </common:LayoutAwarePage.Resources>
  34. <Grid x:Name="LayoutRoot" Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
  35. <Grid x:Name="ContentRoot" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Margin="100,20,100,20">
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="Auto"/>
  38. <RowDefinition Height="*"/>
  39. <RowDefinition Height="Auto"/>
  40. </Grid.RowDefinitions>
  41. <!-- Header -->
  42. <StackPanel Orientation="Horizontal" Grid.Row="0">
  43. <Image x:Name="WindowsLogo" Stretch="None" Source="Assets/windows-sdk.png" AutomationProperties.Name="Windows Logo" HorizontalAlignment="Left" Grid.Column="0"/>
  44. <TextBlock VerticalAlignment="Bottom" Style="{StaticResource TitleTextStyle}" TextWrapping="Wrap" Grid.Column="1" Text="OpenCV for Windows RT"/>
  45. </StackPanel>
  46. <ScrollViewer x:Name="MainScrollViewer" Grid.Row="1" ZoomMode="Disabled" IsTabStop="False" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Padding="0,0,0,20" >
  47. <Grid>
  48. <Grid.RowDefinitions>
  49. <RowDefinition Height="Auto"/>
  50. <RowDefinition Height="*"/>
  51. </Grid.RowDefinitions>
  52. <TextBlock x:Name="FeatureName" Grid.Row="0" Text="Add Sample Title Here" Style="{StaticResource HeaderTextStyle}" TextWrapping="Wrap"/>
  53. <!-- Content -->
  54. <Grid Grid.Row="1">
  55. <!-- All XAML in this section is purely for design time so you can see sample content in the designer. -->
  56. <!-- This will be replaced at runtime by live content. -->
  57. <Grid>
  58. <Grid.RowDefinitions>
  59. <RowDefinition Height="Auto"/>
  60. <RowDefinition Height="Auto"/>
  61. <RowDefinition Height="Auto"/>
  62. <RowDefinition Height="Auto"/>
  63. <RowDefinition Height="Auto"/>
  64. <RowDefinition Height="Auto"/>
  65. <RowDefinition Height="Auto"/>
  66. <RowDefinition Height="*"/>
  67. </Grid.RowDefinitions>
  68. <Grid.ColumnDefinitions>
  69. <ColumnDefinition Width="Auto"/>
  70. <ColumnDefinition Width="*"/>
  71. </Grid.ColumnDefinitions>
  72. <TextBlock Grid.Row="0" Text="Input" Style="{StaticResource H2Style}"/>
  73. <TextBlock x:Name="ScenarioListLabel" Text="Select Scenario:" Grid.Row="1" Style="{StaticResource SubheaderTextStyle}" Margin="0,5,0,0" />
  74. <ListBox x:Name="Scenarios" Margin="0,0,20,0" Grid.Row="2" AutomationProperties.Name="Scenarios" HorizontalAlignment="Left"
  75. VerticalAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Auto"
  76. AutomationProperties.LabeledBy="{Binding ElementName=ScenarioListLabel}" MaxHeight="125">
  77. <ListBox.ItemTemplate>
  78. <DataTemplate>
  79. <TextBlock Text="{Binding Name}"/>
  80. </DataTemplate>
  81. </ListBox.ItemTemplate>
  82. </ListBox>
  83. <TextBlock x:Name="DescriptionText" Margin="0,5,0,0" Text="Description:" Style="{StaticResource SubheaderTextStyle}" Grid.Row="1" Grid.Column="1"/>
  84. <!-- Input Scenarios -->
  85. <UserControl x:Name="InputSection" Margin="0,5,0,0" IsTabStop="False" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top"/>
  86. <!-- Output section -->
  87. <TextBlock Text="Output" Grid.Row="5" Margin="0,25,0,20" Style="{StaticResource H2Style}" Grid.ColumnSpan="2"/>
  88. <TextBlock x:Name="StatusBlock" Grid.Row="6" Margin="0,0,0,5" Grid.ColumnSpan="2"/>
  89. <!-- Output Scenarios -->
  90. <UserControl x:Name="OutputSection" Grid.Row="7" Grid.ColumnSpan="2" BorderThickness="0"/>
  91. </Grid>
  92. </Grid>
  93. </Grid>
  94. </ScrollViewer>
  95. <!-- Footer -->
  96. <Grid x:Name="Footer" Grid.Row="3" Margin="0,10,0,10" VerticalAlignment="Bottom" >
  97. <Grid.RowDefinitions>
  98. <RowDefinition Height="Auto"/>
  99. <RowDefinition Height="Auto"/>
  100. <RowDefinition Height="Auto"/>
  101. </Grid.RowDefinitions>
  102. <Grid.ColumnDefinitions>
  103. <ColumnDefinition Width="Auto"/>
  104. <ColumnDefinition Width="*"/>
  105. </Grid.ColumnDefinitions>
  106. <StackPanel x:Name="FooterPanel" Orientation="Horizontal" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right"/>
  107. </Grid>
  108. </Grid>
  109. <VisualStateManager.VisualStateGroups>
  110. <!-- Visual states reflect the application's view state -->
  111. <VisualStateGroup>
  112. <VisualState x:Name="FullScreenLandscape">
  113. <Storyboard>
  114. </Storyboard>
  115. </VisualState>
  116. <VisualState x:Name="Filled">
  117. <Storyboard>
  118. </Storyboard>
  119. </VisualState>
  120. <VisualState x:Name="FullScreenPortrait">
  121. <Storyboard>
  122. </Storyboard>
  123. </VisualState>
  124. <VisualState x:Name="Snapped">
  125. <Storyboard>
  126. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="ContentRoot">
  127. <DiscreteObjectKeyFrame KeyTime="0">
  128. <DiscreteObjectKeyFrame.Value>
  129. <Thickness>20,20,20,20</Thickness>
  130. </DiscreteObjectKeyFrame.Value>
  131. </DiscreteObjectKeyFrame>
  132. </ObjectAnimationUsingKeyFrames>
  133. </Storyboard>
  134. </VisualState>
  135. </VisualStateGroup>
  136. </VisualStateManager.VisualStateGroups>
  137. </Grid>
  138. </common:LayoutAwarePage>