windows phone开发之获取摄像头
引入命名空间:
代码段:
private void button1_Click(object sender, RoutedEventArgs e)
{
CameraCaptureTask cameraCaptureTask = new CameraCaptureTask();
cameraCaptureTask.Show();//打开摄像头程序
cameraCaptureTask.Completed +=
new EventHandler<PhotoResult>(cameraCaptureTask_Completed);//拍照完返回
}