CamView.xaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <phone:PhoneApplicationPage
  2. x:Class="CameraApp.Views.MainView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  6. xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. FontFamily="{StaticResource PhoneFontFamilyNormal}"
  10. FontSize="{StaticResource PhoneFontSizeNormal}"
  11. Foreground="{StaticResource PhoneForegroundBrush}"
  12. SupportedOrientations="Landscape" Orientation="LandscapeLeft"
  13. mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="728"
  14. shell:SystemTray.IsVisible="False" Title="hello">
  15. <!--LayoutRoot is the root grid where all page content is placed-->
  16. <Grid x:Name="LayoutRoot" Background="Transparent">
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="640" />
  19. <ColumnDefinition Width="160" />
  20. </Grid.ColumnDefinitions>
  21. <Canvas x:Name="viewfinderCanvas" Width="640" Height="480"
  22. HorizontalAlignment="Left" MouseLeftButtonDown="draw_MouseLeftButtonDown" >
  23. <!--Camera viewfinder -->
  24. <Canvas.Background>
  25. <VideoBrush x:Name="viewfinderBrush" />
  26. </Canvas.Background>
  27. </Canvas>
  28. <!--Button StackPanel to the right of viewfinder>-->
  29. <!--<StackPanel Grid.Column="1" >
  30. <Button x:Name="ShutterButton" Content="Capture" Click="ShutterButton_Click" FontSize="26" FontWeight="ExtraBold" Height="75" />
  31. </StackPanel>-->
  32. <!--Used for debugging >-->
  33. <TextBlock Height="40" HorizontalAlignment="Left" Margin="8,428,0,0" Name="txtDebug" VerticalAlignment="Top" Width="626" FontSize="24" FontWeight="ExtraBold" />
  34. </Grid>
  35. <!--Sample code showing usage of ApplicationBar-->
  36. <phone:PhoneApplicationPage.ApplicationBar>
  37. <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" >
  38. <shell:ApplicationBarIconButton x:Name="ShutterButton" IconUri="Images/capture.png" Text="Capture" Click="ApplicationBarIconButton_Click" />
  39. </shell:ApplicationBar>
  40. </phone:PhoneApplicationPage.ApplicationBar>
  41. </phone:PhoneApplicationPage>