WPF binding: Doing a temperature converter app
        Posted  
        
            by 
                Bob
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Bob
        
        
        
        Published on 2011-01-06T16:35:51Z
        Indexed on 
            2011/01/06
            16:53 UTC
        
        
        Read the original article
        Hit count: 193
        
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?
© Stack Overflow or respective owner