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
Post a Comment