No Basic Camera UI for Windows Phone 8.1

三世轮回 提交于 2019-12-12 01:29:05

问题


OK. Questions.

  1. I know there is no CameraCaptureUI in Windows phone 8.1, so I have to use MediaCapture class. That's fine but what about UI? Do I have to make and position button in my screen from scratch?(like flash button, front camera button etc)
  2. About Nokia Imaging SDK. does it provide any UI? and can I use that API for taking picture instead of working directly with MediaCapture?. I tried to find out some information about initializing and taking picture using nokia imaging sdk, but I couldn't find.
  3. Can you let me know any useful link for implementing MediaCapture in windows phone 8.1? There are lots of links but only for silverlight 8.0 not 8.1.

回答1:


You can use FileOpenPicker and if you specify .png and .jpg in the list of file types, the picker will have a camera capture button that will open standard camera capture UI:

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

  picker.ContinuationData["Data"] = "Something"; // Will be passed back to the app after the picker finishes

  picker.PickSingleFileAndContinue();

If you still want to write your own UI, check this link: http://www.romasz.net/how-to-take-a-photo-in-windows-runtime/



来源:https://stackoverflow.com/questions/26392977/no-basic-camera-ui-for-windows-phone-8-1

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