例:Grid的子项是包含边框的复选框CheckBox
//遍历Grid中的子项
foreach (var c in this.grid_box.Children)
{
Border bd = c as Border;//列边框
if (bd.Child.GetType().Name.Equals("CheckBox"))
{
CheckBox cb_box = bd.Child as CheckBox;
cb_box.IsChecked = false;//取消选中复选框
}
}
知识一点点的累积,技术一点点的提高!加油!