【发布时间】:2017-02-26 01:22:12
【问题描述】:
我有如下代码
private void btnSave_Click(object sender, EventArgs e){
(ApplicationBar.Buttons[0] as ApplicationBarIconButton).IsEnabled = false;
if (backstatus == false)
{
backstatus = true;
myPopup.IsOpen = true;
Dispatcher.BeginInvoke(delegate()
{
// some big code which take five minits to execute
}
} }
在点击该按钮时,它处于启用模式。执行后将禁用该功能。
但我需要在处理其他功能时禁用它。
【问题讨论】:
-
你能把场景说得清楚一点吗?
-
当我点击保存按钮时,它需要一些时间来保存,而它正在加载我想要禁用的那个按钮,它是启用的。保存数据后,该按钮被禁用。但我想在加载时间之前禁用该按钮。
标签: c# xaml c#-4.0 windows-phone-8 windows-phone-8.1