如何在WP8中以编程方式关闭MessageBox?(How To Close MessageBox Programmatically in WP8?)
我知道有关于以编程方式关闭MessageBox的问题。 但这些问题的解决方案是使用计时器。
我正在尝试开发一个NFC应用程序,所以当我创建一个MessageBox时,它包含一条消息
Please Tap Your NFC
。 从技术上讲,Timer没有帮助。 我需要一种方法来关闭或处理MessageBox。请指教。
I'm aware that there are already questions questions asked regarding closing a MessageBox programmatically . But the solution to those questions is to use a timer.
I am trying to develop an NFC application, so when i create a MessageBox, it contains a message
Please Tap Your NFC
. So technically, the Timer isn't helpful. I need a way to close or dispose a MessageBox.Please advice.
原文:https://stackoverflow.com/questions/16848986
最满意答案
我想你可能会发现在scrollview控件中使用了该事件。 您可以覆盖该控件的javascript处理程序,以允许它保持冒泡。
要覆盖该函数,您可以使用此技术: 在引用原始函数时覆盖JavaScript函数
快速浏览一下这个文件,看起来这个方法可以提供你想要的线索:
_handleDragMove:function(e,ex,ey)
特别:
var svdir = this.options.direction; if(!this._directionLock)
我使用的是此处显示的scrollview版本: http : //jquerymobile.com/test/experiments/scrollview/scrollview-nested.html
I think you might find that the event is consumed in the scrollview control. You can override the javascript handler against that control to allow it to keep bubbling.
To override the function you can use this technique: Overriding a JavaScript function while referencing the original
Having a quick look at the file, it looks like this method could hold clues as to what you want:
_handleDragMove: function(e, ex, ey)
specifically:
var svdir = this.options.direction; if (!this._directionLock)
I was using the version of scrollview shown here: http://jquerymobile.com/test/experiments/scrollview/scrollview-nested.html
相关问答
更多-
这可以在这里得到解答: http : //www.telerik.com/forums/scrollview-is-missing-a-lot-of-essential-functionality- (-) var scrollview = $("[data-role=scrollview]").getKendoMobileScrollView(); var cancel = function() { this.cancel(); }; scrollview.pane.userEvents.bind("s ...
-
通过简单地滚动我自己的这些事件的实现,我想出了解决这个问题的方法。 这里有一些关于如何做类似事情的示例代码: https://snipt.net/blackdynamo/swipe-up-and-down-support-for-jquery-mobile/ 如果其他人使用此代码来修复我的同一问题,请确保知道该文章正在实施swipeup和swipeown,因此您必须对其进行调整。 最后,我不完全确定这段代码与swipeleft和swiperight的实际实现之间的区别,但是这种方法始终如一,所以我正在减少损 ...
-
如果我没有完全弄错e (在回调事件中)有一个数组触及移动浏览器。 每个触摸事件都有一个元素。 这是一个例子: document.addEventListener('touchmove', function(event) { event.preventDefault(); var touch = event.touches[0]; console.log("Touch x:" + touch.pageX + ", y:" + touch.pageY); }, false); If I ...
-
将stopImmediatePropagation()应用于所有jQuery移动事件(Apply stopImmediatePropagation() to all jQuery mobile events)[2022-09-18]
你可以这样做: $(document).on('click', function(event){ event.stopImmediatePropogation(); }); The only solution is to do event.stopImmediatePropogation(); on each handler function. It's a hassle. -
我发现它不是jquery mobile我应该重写,但我正在使用的幻灯片插件(jquery cycle2)。 这是我提出的代码: window.global_touches = null; $('.page').on({ touchstart: function(e) { e.preventDefault(); window.global_touches = e.originalEvent.touches; }, touchmove: function(e) ...
-
它将停用触摸: - 添加CSS代码段: *{ touch-action: none; } 但是仅在某个区域重新激活触摸事件,以允许玩家播放或激活触摸 要激活某些地方,请添加: - #activetouch{ touch-action: chained; } 参考: https : //developer.mozilla.org/en-US/docs/Web/CSS/touch-action It will deactivate the touch:- Add CSS snippets: ...
-
在处理滑动手势时,您可以使用nearest()来检查事件目标元素是否不在滑块小部件内: $("div.ui-page").live("swipeleft", function(e) { if (!$(e.target).closest(".ui-slider, .ui-slider-track").length) { var nextpage = $(this).next('div[data-role="page"]'); if (nextpage.length > ...
-
我想你可能会发现在scrollview控件中使用了该事件。 您可以覆盖该控件的javascript处理程序,以允许它保持冒泡。 要覆盖该函数,您可以使用此技术: 在引用原始函数时覆盖JavaScript函数 快速浏览一下这个文件,看起来这个方法可以提供你想要的线索: _handleDragMove:function(e,ex,ey) 特别: var svdir = this.options.direction; if(!this._directionLock) 我使用的是此处显示的scrollview版本: ...
-
为了扩展Omar上面的评论... jQuery Mobile现在与最新版本的jQuery不兼容。 如果您查看jquerymobile主页 ,您将在下载按钮(右上角)下看到您可以使用的jQuery版本。 目前,对于jQM v.1.4.5,您需要: jQuery 1.8 - 1.11 / 2.1 To expand on Omar's comment above... jQuery Mobile isn't compatible right now with the latest version of jQue ...
-
修复了使用以下插件的问题: TouchSwipe ,它能够简单地从事件中排除元素。 Fixed issue using the following plugin: TouchSwipe which has the ability to simple exclude elements from the events.