[UWP] Windows.Media.Capture在小尺寸窗口中打开Windows 10相机 [英] [UWP]Windows.Media.Capture opens windows 10 camera in small size window

查看:384
本文介绍了[UWP] Windows.Media.Capture在小尺寸窗口中打开Windows 10相机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用表面相机的UWP应用程序--Windows.Media.Capture。应用程序打开相机但是在小尺寸窗口中。我只在平板电脑模式下运行应用程序。对于Windows 8.1,相机始终以全屏模式触发。
这个问题有什么解决方案吗? 
I am developing UWP application to use surface camera with - Windows.Media.Capture. The application opens camera but in small size window. I am running application in Tablet mode only. For windows 8.1 camera always triggers in fullscreen mode. Is there any solution for the issue? 

推荐答案

如果您使用的是CameraCaptureUi,则无法自定义窗口所示。如果您只需要快速简便的相机捕捉,并且无论它看起来如何,这个API都是合适的。

If you're using the CameraCaptureUi then there is no way to customize the window shown. This API is suitable if you just need a quick-and-easy camera capture and it doesn't matter what it looks like.

如果相机是您应用的核心部分而您需要一个特定的用户界面或功能(即完整的应用程序窗口大小),然后你需要使用MediaCapture API在进程中实现自己的Camera UI。

If the camera is a core part of your app and you need a specific UI or capabilities (i.e. full app window size) then you'll need to implement your own Camera UI in-proc with the MediaCapture API.

基本相机应用程序示例将获得您开始朝着正确的方向实施自己的相机用户界面。请参阅https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CameraStarterKit 

The Basic Camera App sample will get you started in the right direction to implement your own Camera UI. See https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CameraStarterKit 

现有的UserVoice请求允许CameraCaptureUI完整运行屏幕:https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/10440042-improve-cameracaptureui-on-windows-10-desktop

There is an existing UserVoice request to allow the CameraCaptureUI to run full screen: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/10440042-improve-cameracaptureui-on-windows-10-desktop

这是正在调查未来的Windows更新(创建者更新后)。由于CameraCaptureUI是由相机应用程序实现的,并且在应用程序的上下文之外运行,因此其窗口大小取决于底层的IPC管道,而不是直接由相机应用程序或您的应用程序控制的
。在更新低级别管道之前,CameraCaptureUI无法控制其窗口的大小。

This is under investigation for a future update to Windows (after the Creators Update). Because the CameraCaptureUI is implemented by the camera app and runs outside of your app's context its window size depends on the underlying IPC plumbing and isn't directly controllable by either the camera app or your app. Until that low level plumbing is updated there is no way for the CameraCaptureUI to control the size of its window.


这篇关于[UWP] Windows.Media.Capture在小尺寸窗口中打开Windows 10相机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆