CameraCaptureTask missing in Window Phone 8.1 runtime???

自作多情 提交于 2019-12-11 09:35:55

问题


How to show camera app and capture when Chooser tab completed. I used CameraCaptureTask in window phone. http://msdn.microsoft.com/en-us/library/windows/apps/hh394006%28v=vs.105%29.aspx. But it missing in window phone 8.1 runtime.


回答1:


In Windows Phone 8.1 XAML apps you can use the FileOpenPicker to select am image either from the picture library, or from the camera. Make sure you have added ".jpg" to the picker file types, otherwise the camera button may not show. Here is sample code:

FileOpenPicker picker = new FileOpenPicker();
picker.FileTypeFilter.Add(".png");
picker.FileTypeFilter.Add(".jpg");

picker.ContinuationData["DATA"] = "MYDATA";  // The app may be closed while displaying the picker dialog, and this data will be passed back to the application on activation.

picker.PickSingleFileAndContinue();


来源:https://stackoverflow.com/questions/25283066/cameracapturetask-missing-in-window-phone-8-1-runtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!