WPF binding: Doing a temperature converter app
- by Bob
Hi there,
I'm doing a little app that basically has 2 text boxes. You'll enter Fahrenheit into TextBoxA and Celsius into TextBoxB.
As the text changes in TextBoxA I want the equivalent Celsius value to be displayed in TextBoxB and vice versa.
I can come up with a solution pretty easy for this but i'm trying to be a little clever.
Is there a way to do it all in Xaml except for a Convert class that does the maths? So basically I want the TextChanged event of one textBox to pass in it's value into a Converter class that is evaluated and sent to the other TextBox and visa versa.
Anyone know how I can achieve this ... and if it's possible at all?