prevent双重双击射击的命令 [英] Prevent double-click from double firing a command

查看:107
本文介绍了prevent双重双击射击的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设你有一个控制,火灾的命令:

Given that you have a control that fires a command:

<Button Command="New"/>

有没有一种方法,以prevent被触发两次命令,如果在命令的用户双击?

Is there a way to prevent the command from being fired twice if the user double clicks on the command?

编辑:什么是在这种情况下,显著的是,我现在用的是指挥模型在WPF。

What is significant in this case is that I am using the Commanding model in WPF.

似乎只要按钮处于pressed,该命令被执行。我没有看到任何方式preventing这除了禁用或隐藏按钮。

It appears that whenever the button is pressed, the command is executed. I do not see any way of preventing this besides disabling or hiding the button.

推荐答案

或许按钮应在第一次点击,并直至处理完毕?停用

Perhaps the button should disabled after the first click and until the processing has been completed?

这篇关于prevent双重双击射击的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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