Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/314.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何模拟在不调用onChange事件的情况下更改复选框_C#_User Interface - Fatal编程技术网

C# 如何模拟在不调用onChange事件的情况下更改复选框

C# 如何模拟在不调用onChange事件的情况下更改复选框,c#,user-interface,C#,User Interface,我试图模拟改变一个检查状态,但是我遇到了一个持续循环,它的OnChange事件。有解决办法吗 我想做的事情:例如: Widget widget = RenderEngine.getWidget("checkbox"); widget.VALUE = "False"; //do something //return to the previous state widget.VALUE = widgetPreviousValue; 谢谢。在onCh

我试图模拟改变一个检查状态,但是我遇到了一个持续循环,它的OnChange事件。有解决办法吗

我想做的事情:例如:

     Widget widget = RenderEngine.getWidget("checkbox");
     widget.VALUE = "False";
     //do something
     //return to the previous state
     widget.VALUE = widgetPreviousValue;

谢谢。

在onChange事件中,您能检查事件的来源吗?

您必须更改代码的值才能运行吗?您可以重构它,以便传入值而不是使用小部件的值吗?