8.0 Cameras and photos: Capturing photos via Photocapturedevice
Introduced
Unique Windows Phone 8.0 camera and photos
Capturing photos by Photocapturedevice
Example
Demonstration of the application of Photocapturedevice (WP8)
Cameraandphoto/photocapturedevicedemo.xaml
<phone:phoneapplicationpage x:class= "Demo.CameraAndPhoto.PhotoCaptureDeviceDemo" xmlns= "HTTP://SCHEMAS.MICR Osoft.com/winfx/2006/xaml/presentation "xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "xmlns:phone=" Clr-namespace:microsoft.phone.controls;assembly=microsoft.phone "Xmlns:shell=" Clr-namespace:
Microsoft.phone.shell;assembly=microsoft.phone "xmlns:d=" http://schemas.microsoft.com/expression/blend/2008 " Xmlns:mc= "http://schemas.openxmlformats.org/markup-compatibility/2006" fontfamily= "{StaticResource Phonefontfamilynormal} "fontsize=" {StaticResource phonefontsizenormal} "foreground=" {StaticResource PhoneForegroun Dbrush} "supportedorientations=" Portrait "orientation=" Portrait "mc:ignorable=" D "shell:systemtray.isvisible="
True "> <grid x:name=" layoutroot "background=" Transparent "> <StackPanel>
<stackpanel orientation= "Horizontal" > <canvas width= "height=" "180" rendertransformorigin= "0.5 0.5" > <canvas.backgro und> <videobrush x:name= "VideoBrush"/> </canvas.background&
Gt <Canvas.RenderTransform> <rotatetransform x:name= "RT"/> ;/canvas.rendertransform> </Canvas> <image name= "Imgpreview" width= "240" height= "180"/> </StackPanel> <stackpanel orientation= "Horizontal" Marg
in= "0 0 0" > <button name= "btncapture" content= "photography" click= "Btncapture_click"/>
<button name= "Btnfocus" content= "Auto Focus" click= "Btnfocus_click"/> </StackPanel>
<textblock x:name= "lblmsg" textwrapping= "Wrap" margin= "0 0 0"/> </StackPanel> </Grid> </phone:PhoneApplicationPage>