📌  相关文章
📜  在 C# 代码示例中访问具有特定标记的所有控件

📅  最后修改于: 2022-03-11 14:48:43.609000             🧑  作者: Mango

代码示例1
private void FindTag(Control.ControlCollection controls)
{
    foreach (Control c in controls)
    {
        if (c.Tag != null)
        //logic

       if (c.HasChildren)
           FindTag(c.Controls); //Recursively check all children controls as well; ie groupboxes or tabpages
    }
}