UpdateSourceTrigger doesnt work ??

Topics: Prism v2 - WPF 3.5
Mar 10, 2009 at 7:43 AM
Hi,

I just found out, that this xaml code

<

 

TextBox Height="Auto" Name="TextBox1" Width="Auto" MinWidth="200" Text="{Binding Path=SearchCriteria.Text, UpdateSourceTrigger=PropertyChanged}" />

 

doesnt work as expected.

I start out verifying this issue and create a new project, new window, new textbox and it works without any problem. If its within an application using the Composite WPF and Silverlight stuff, nomore updates of the source occures. Only ofter loosing the focus, the textbox updates the source, like the default behavior.

Is there any reason, why the framework overwrites this setting or is there any other known reason for this chabge in behavior?

Is there a way to make it working?

Thanks a lot

Gerhard
Mar 10, 2009 at 4:18 PM

Hi Gerard,

There is not any known issue related with the UpdateSourceTrigger property and the described behavior.

I have tried to reproduce your scenario starting from the Hello World WPF QuickStart, but unfortunately I cannot reproduce that behavior, everything works as expected and the TextBox is updated when the presentation model’s PropertyChanged event is raised.

 

Perhaps, you may want to give us more context about your specific implementation so we can continue helping you with this problem.

 

Ezequiel Sculli

http://blogs.southworks.net/esculli/
Mar 10, 2009 at 8:38 PM
Hi,
sorry, I found the issue. I call a function but I forgot the little word 'return' ...
This blocks the update mechanism. Its working now.
Thanks
Gerhard