Hi,
I am currently having an issue with the XamInput controls and when they update their binding. The standard silverlight controls update their binding when the control loses focus. However, the XamInput controls are updating their binding as soon as the value changes. Is there any way to control this behaviour and have it act like the standing silverlight controls?
Thanks in Advance.
Hello Calsy,
In TwoWay bindings, changes to the target automatically update the source, except when binding to the Text property of a TextBox. In this case, the update occurs when the TextBox loses focus. To disable automatic source updates, set the UpdateSourceTrigger property to Explicit, and in xamInput's lostFocus event call [BindingExpression].UpdateSource() method.
Hope this helps.
Regards.
Hi Anastas,
Thanks for the response. I have implemented your suggestion and it is working great in most situations, except in a grid. I have a TemplateColumn with a custom control in it consisting of a XamMaskedInput and a Button. I want to handle the Lost_Focus event of the XamMaskedInput and update the bindingsource, but at that point it appear the grid has already cleared the DataContext of the XamMaskedInput. Is there a way to get around this?
Thanks.
I'm not sure what is your case. It would be great to provide a small project which reproduces this behaviour.
I tried one case, where two xamGrids are bind to same source. In xamMaskedInput's lostFocus event updating the BindingSource works okay. Maybe I'm missing something.
Anastas
I have found an alternative solution which has solved my problem. I am capturing the CellExitingEditMode event and handling my Data Manipulation in there.