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

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -