Click here to Skip to main content
15,073,911 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to clear all text box value when i pressed a button.I used this code that is fine work in winform but when i am trying to use this same code in wpf then error occured at this.Controls position.Here is the code.Please give me a solution.
C#
foreach (Control c in this.Controls)                 
    if (c is TextBox) 
       (c as TextBox).Clear();
Posted
Updated 20-Jun-14 22:01pm
v2

1 solution

   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900