O'Reilly logo

Microsoft® Silverlight® Edition: Programming Windows® Phone 7 by Charles Petzold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

TextBox Binding Updates

The Text property of a TextBox can be a target of a data binding, but some potential problems are introduced. Once you allow the user to type anything into a TextBox, you need to deal with faulty input.

Suppose you want to write a program that solves quadratic equations, that is, solutions of the equation

TextBox Binding Updates

To make the program most versatile, you’d probably supply three TextBox controls to allow the user to type in values of A, B, and C. You could then include a Button labeled “calculate” that obtains the two solutions from the standard equation:

You’d then display the solutions in a TextBlock.

With what you know about data bindings ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required