Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序上有 200 个复选框,我必须更改它们的 ischecked 值。所以我想使用这样的代码:
checkbox(i).ischecked=true;(它不工作:))
这可能吗?或者我如何在 c# 中使用它的代码?我想你已经理解我了。
我找到了答案:
string a = "image2"; Image ima = this.FindName(a) as Image; ima.Visibility = System.Windows.Visibility.Collapsed; string b = "checkBox1"; CheckBox ch = this.FindName(b) as CheckBox; ch.IsChecked = true;