UpdateSourceTrigger=Explicit Updating multiple field
I have multiple textbox with the biding set as explicit
Text="{Binding UpdateSourceTrigger=Explicit, XPath=Columns/Column[1]/@Header}"
when i try to update them with with a button:
txtName.GetBindingExpression( TextBox.TextProperty ).UpdateSource();
txtColumn1.GetBindingExpression( TextBox.TextProperty ).UpdateSource();
txtColumn2.GetBindingExpression( TextBox.TextProperty ).UpdateSource();
The first line of code will update his one and reset the biding of all the texboxes meaning that only the first textbox will upd开发者_Go百科ate the underlining property.
Any idea of how to do this?
If all other text boxes are updated because the first text box raised the change notification, you can have some "Update source in progress" flag, and don't raise the Property Change Notification in this case, than the Binding Targets won't get updated, and you'd be able to continue updating the binding sources.
精彩评论