没有适用于 Windows Phone 8.1 的基本相机 UI [英] No Basic Camera UI for Windows Phone 8.1
本文介绍了没有适用于 Windows Phone 8.1 的基本相机 UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的.问题.
- 我知道 Windows phone 8.1 中没有 CameraCaptureUI,所以我必须使用 MediaCapture 类.那很好,但是 UI 呢?我是否必须从头开始在屏幕上制作和定位按钮?(如闪光灯按钮、前置摄像头按钮等)
- 关于诺基亚影像 SDK.它提供任何用户界面吗?我可以使用该 API 来拍照而不是直接使用 MediaCapture 吗?.我试图通过诺基亚成像sdk查找一些有关初始化和拍照的信息,但找不到.
- 您能否告诉我在 Windows Phone 8.1 中实现 MediaCapture 的任何有用链接?有很多链接,但仅适用于 Silverlight 8.0 而不是 8.1.
推荐答案
您可以使用 FileOpenPicker,如果您在文件类型列表中指定 .png 和 .jpg,选择器将有一个相机捕捉按钮,可以打开标准相机捕获用户界面:
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();
如果您仍想编写自己的 UI,请查看此链接:http://www.romasz.net/how-to-take-a-photo-in-windows-runtime/
If you still want to write your own UI, check this link: http://www.romasz.net/how-to-take-a-photo-in-windows-runtime/
这篇关于没有适用于 Windows Phone 8.1 的基本相机 UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文