I have a string that is saved to a database that is compiled by two textboxes and separated by . e.g. if one TextBox has 2 and the other has 5, 2.5 gets saved to the database.
The issue I have now is with loading saved answers. Is there anyway to bind TextBox.Text to just a certain character of a string (i.e. the first textbox will always be SavedAnswer[0] and the other will be SavedAnswer[2]) or will I have to create a converter, pass in the full answer and then parse it?
There are a couple ways you could go about it. The easiest way would be to make your model have two related properties that you bind to separately. The important part is to make sure that they have their
PropertyChangedevents fired so theBindingworks properly on the UI to reflect changes.Example: