C#. Binding object to object
        Posted  
        
            by w1z
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by w1z
        
        
        
        Published on 2010-04-05T20:06:54Z
        Indexed on 
            2010/04/05
            20:43 UTC
        
        
        Read the original article
        Hit count: 211
        
c#
|databinding
Hello all,
I develop the part of app functionality. I have the databinding object 'A' and another object 'B'.
public class SomeProxy
{       
    public SomeProxy(BindingSource A)
    {          
        var b = new B();            
    }
}
public class B
{
    public int SomePropertyFromA{get;set;}
    //Some autocalculated propeties, that are based on SomePropertyFromA
    //I want to reculculate them, when the SomePropertyFromA will be changed
}
'B' object culculates some values, based on the property 'a' of the 'A' object. I want to bind property in object 'B' to the same property 'a' in 'A'. It's need to handle on changes of the 'a' property, because some UI controls are binded to 'B'-s properties. How can I do this?
Sorry for some oddness. Thanks
© Stack Overflow or respective owner