Camerabuttons 事件只是没有在 WP7.1 应用程序中触发

编程入门 行业动态 更新时间:2024-10-26 12:26:45
本文介绍了Camerabuttons 事件只是没有在 WP7.1 应用程序中触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我已认真遵循 http://msdn.microsoft/en-us/library/microsoft.devices.camerabuttons.shutterkeyhalfpressed(v=vs.92).aspx 尝试在我的WP7.1 Silverlight 应用程序.在我的主要形式中,我有:

I've diligently followed the instructions at http://msdn.microsoft/en-us/library/microsoft.devices.camerabuttons.shutterkeyhalfpressed(v=vs.92).aspx to try and hook the camera events in my WP7.1 Silverlight app. In my main form I have:

   protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
    {
        CameraButtons.ShutterKeyPressed += new EventHandler(CameraButtons_ShutterKeyPressed);
    }

然后……

   void CameraButtons_ShutterKeyPressed(object sender, EventArgs e)
    {
        // stuff
    }

然而,这个事件永远不会触发.当我按下相机按钮时,手机会跳到相机模式.我错过了什么吗?我从上面的文章中了解到,我可能需要将以下内容添加到我的 WPAppManifest.xml 中,因为该项目是从 WP7.0 转换而来的:

However, this event never fires. When I press the camera button, the phone just jumps to camera mode. Am I missing something? I got the sense from the above article that I might need to add the following to my WPAppManifest.xml, because the project was converted from WP7.0:

  <Capability Name="ID_CAP_ISV_CAMERA" />

...但我这样做了,并没有太大变化.有什么想法吗?

... but I did that, and nothing much changed. Any ideas?

推荐答案

如果捕获尚未开始 (CaptureSource.Start),则不会触发此事件.

If the capture has not started (CaptureSource.Start), this event will not fire.

这篇关于Camerabuttons 事件只是没有在 WP7.1 应用程序中触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-25 14:27:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1117684.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   事件   Camerabuttons

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!