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 13 <common:LayoutAwarePage 14 x:Class="SDKSample.MediaCapture.AdvancedCapture" 15 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 16 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 17 xmlns:local="using:$rootsnamespace$" 18 xmlns:common="using:SDKSample.Common" 19 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 20 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 21 mc:Ignorable="d"> 22 23 <Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Left" VerticalAlignment="Top"> 24 <Grid.RowDefinitions> 25 <RowDefinition Height="Auto"/> 26 <RowDefinition Height="*"/> 27 </Grid.RowDefinitions> 28 <Grid x:Name="Input" Grid.Row="0"> 29 <Grid.RowDefinitions> 30 <RowDefinition Height="Auto"/> 31 <RowDefinition Height="Auto"/> 32 <RowDefinition Height="*"/> 33 </Grid.RowDefinitions> 34 <TextBlock TextWrapping="Wrap" Grid.Row="0" Text="This scenario shows how to enumerate cameras in the system. Choose a camera from the list to preview, record or take a photo from the chosen camera. You can add the gray scale effect using the checkbox provided." Style="{StaticResource BasicTextStyle}" HorizontalAlignment="Left"/> 35 <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0,10,0,0"> 36 <ListBox x:Name="EnumedDeviceList2" SelectionChanged="lstEnumedDevices_SelectionChanged" /> 37 <Button x:Name="btnStartDevice2" Click="btnStartDevice_Click" IsEnabled="true" Margin="0,0,10,0" Content="StartDevice"/> 38 <Button x:Name="btnStartPreview2" Click="btnStartPreview_Click" IsEnabled="true" Margin="0,0,10,0" Content="StartPreview"/> 39 <ComboBox x:Name="EffectTypeCombo" Width="120" SelectedIndex="0"> 40 <ComboBoxItem Content="Preview"/> 41 <ComboBoxItem Content="Grayscale"/> 42 <ComboBoxItem Content="Canny"/> 43 <ComboBoxItem Content="Sobel"/> 44 <ComboBoxItem Content="Histogram"/> 45 </ComboBox> 46 <Button Content="Apply" HorizontalAlignment="Stretch" VerticalAlignment="Top" Click="Button_Click"/> 47 </StackPanel> 48 <StackPanel x:Name="EffectTypeCombo1" Orientation="Horizontal" Grid.Row="1" Margin="324,5,-324,7"/> 49 </Grid> 50 51 <Grid x:Name="Output" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1"> 52 <StackPanel Orientation="Horizontal" Margin="0,10,0,0"> 53 <StackPanel> 54 <TextBlock Style="{StaticResource BasicTextStyle}" HorizontalAlignment='Center' VerticalAlignment='Center' TextAlignment='Center' Text='Preview' /> 55 <Canvas x:Name="previewCanvas2" Background="Gray"> 56 <CaptureElement x:Name="previewElement2" /> 57 </Canvas> 58 </StackPanel> 59 <StackPanel/> 60 <StackPanel/> 61 </StackPanel> 62 </Grid> 63 64 <!-- Add Storyboards to the visual states below as necessary for supporting the various layouts --> 65 <VisualStateManager.VisualStateGroups> 66 <VisualStateGroup> 67 <VisualState x:Name="FullScreenLandscape"/> 68 <VisualState x:Name="Filled"/> 69 <VisualState x:Name="FullScreenPortrait"/> 70 <VisualState x:Name="Snapped"/> 71 </VisualStateGroup> 72 </VisualStateManager.VisualStateGroups> 73 </Grid> 74 75 </common:LayoutAwarePage> 76