none
Binding involving Dependency property, plain property and a textbox

    General discussion

  • 1. I have a silverlight control (Control1) which is exposing one dependency property of type double. In the property change callback of this property i am updating a chart control.

    2. Now this silverlight control is embedded inside another silverlight control (HostControl). The HostControl has one property "Max" which raise propertyChanged notification.

    3. This HostControl is having one text box and "Max" is used in binding of this text box "Text" property. This binding is "TwoWay"

    4. Now Control1 dependency property is binded to "Max" property. This binding is "TwoWay"

    So in this case "Max" property is used in binding with the text box as well as the dependency property of Control1.

     

    What i am observing is, in case i change some text in the textbox and loose the focus and bring back the focus again to the textbox, even when i am not changing any text inside the textbox, still the CPU usage shoots upto 25% and comes back to 0% as soon as i move the focus from the textbox to something else.

    Can someone tell me, actually what is going on here. Is it going in some kind of background loop because i am using binding in such hybrid way where 1 DP, 1 POCO property and one textbox are sharing binding.

     

     

    Wednesday, April 11, 2012 6:27 AM