Jul 10, 2012 at 5:25 PM
Edited Jul 10, 2012 at 5:26 PM
|
Dear experts,
For my Caliburn.Micro application, I am trying to
apply validation described here:
http://www.lyquidity.com/devblog/?p=71
But I have a problem: when I explicitly bind a field rather than relying on naming convention (e.g. to change UpdateSourceTrigger from default to something else), the validation stops working. Here is an example:
<TextBox x:Name="Url" MaxLength="255" Text="{Binding EdiProfileDetail.Url, UpdateSourceTrigger=LostFocus}"
Grid.Row="11" Grid.Column="1" Style="{StaticResource DetailTextBox}" />
Maybe somebody could help me with this?
Thanks.
|
|
|
|
ok so you have binding and convention occurring. I would say drop the convention and go twoway for the Mode on the binding. I am assuming since EdiProfileDetail is a property on your viewmodel for this screen, and changes made should bubble
correctly.
|
|
|
|
Thanks for your answer.
I also realized I needed to explicitly set ValidatesOnDataErrors=True
|
|