c# - Clear the text in multiple TextBox's at once -


i have wpf application grid there multiple textboxs. how can make every textbox.text = null; button click?

give try:

   private void button1_click(object sender, routedeventargs e)     {         foreach (uielement control in mygrid.children)         {             if (control.gettype() == typeof(textbox))             {                 textbox txtbox = (textbox)control;                 txtbox.text = null;             }         }     } 

Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -