AdvancedCapture.xaml 3.9 KB

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