1

When dealing with multiple textBoxes for WP7 dev, how to you get the textBox to erase the previous data (string/int) which was previously entered and just display a blank textBox?

Chris Barlow
  • 3,274
  • 4
  • 31
  • 52
AlexDuncan
  • 95
  • 1
  • 3
  • 12
  • 2
    Are you saying you have more than one text box that you want to be emptied of their contents out when an event happens? – bperreault Mar 01 '12 at 02:00
  • yes, so when the user adds inputs a string in one text box, that string data is not carried over to the next textbox, but is cleared. so every additional textbox is blank – AlexDuncan Mar 02 '12 at 17:10

1 Answers1

0

I dont understand your requirement correctly. But as far as i understood , this is the possible solution.

Just assign String.Empty to the textbox.text property for all the textboxes on GotFocus event of the textbox.

Or do you want to find all the textboxes that are present programmatically through code? If not , the above solution should suffice your need.

TutuGeorge
  • 1,972
  • 2
  • 22
  • 42
  • Basically, when the user adds an item via using a text box, and then chooses to add another, the new text box contains the old data that was previously inputted in the first text box. I'm going to give that String.empty idea a try :) – AlexDuncan Mar 02 '12 at 17:08