本文介绍了找到控制权?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
当我按下菜单按钮时,我正在调用Run on class SetupService方法,如下所示:
Hello,
I am calling the method Run on class SetupService when a menu button is clicked as follows:
// SetupCommand
public class SetupCommand : ICommand {
public Boolean CanExecute(Object parameter) {
return true;
} // CanExecute
public event EventHandler CanExecuteChanged {
add { CommandManager.RequerySuggested += value; }
remove { CommandManager.RequerySuggested -= value; }
} // CanExecuteChanged
public void Execute(Object parameter) {
SetupService.Run(parameter.ToString());
} // Execute
} // SetupCommand
在菜单窗口中,我还有一个TextBlock.
在SetupService中运行的方法内部,我需要访问该TextBlock并更改其文本.
如何
谢谢,
Miguel
On the window of the menu I also have a TextBlock.
Inside the method Run in SetupService I need access that TextBlock and change its text.
How can I do this?
Thanks,
Miguel
推荐答案
这篇关于找到控制权?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!