I have a TextBox and I change it’s Left value. And this TextBox is bound to a class that have X property. Now when I change Left value of my TextBox I would like to have X of my class updated. What should i do to force update of my databound class property?
Share
Because of how data-binding works, this type of 2-way binding will only work if the control advertises changes; usually via a
*Changedevent – i.e.LeftChangedin this case. Since there is no such event, you simply can’t, short of subclassingTextBox, re-declaring (new)Leftand adding aLeftChangedthat hooks offLocationChanged.Can you just add an event to
LocationChangedand do it manually? Or just update the object manually when you set the location/left?