Search code examples
c#wpfxamlbuttontextbox

How to clear a textbox once a button is clicked in WPF?


How can I clear a textbox once a button is clicked in the WPF application, I know I have to do it in click method of the button but what code should I use for the mentioned purpose?


Solution

  • Give your textbox a name and then use TextBoxName.Text = String.Empty;