本帖最后由 u013579633 于 2014-02-07 19:33:16 编辑

解决方案 »

  1.   

    this.FindControl(xxx)用这个找找。
      

  2.   

    设置控件的name属性,根据后缀来区分,例如:          m_index = btn.Name.Replace("button", "");//提取后缀
              m_btn = ets.Controls.Find("button" + m_index, true)[0] as Button;//ets为容器
      

  3.   

    Button btn = this.Controls[but] as Button;
      

  4.   

    WPF下,以TextBox为例,winform稍作修改即可。
    this.FindName("textBox1") as System.Windows.Controls.TextBox