问题描述
限时送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:关键词]
发布评论