I'm going through the HOL for DataBinding and validation. I've got the databinding stuff to work (the sample XAML from the Hand-on-lab is from the December CTP, so it required some reworking to be compatible wth the Feb CTP).
However, the Lab documentation says that validation on a text box bound to an integer property should be automatic, and little red boxes should appear around the text box if I enter invalid data.
For some reason this is not happening for me. No errors or anything. The databinding works fine if I enter integers, but then just stops when I enter invalid text. If I delete the text and enter numbers again, databinding works again
Per the lab's instructions, I also added a trigger to the text box style to handle errors, but this also does not get fired:
<
Style.Triggers><Trigger Property="Validation.HasError" Value="true">
<Setter Property="ToolTip"
Value="{Binding RelativeSource Self, Path=(Validation.Errors)].ErrorContent}"/>
</Trigger>
</Style.Triggers>
Any ideas what is going on
David

Auto validation not happening
Tpaktop
Hi David,
Now you need to do use ExceptionValidationRule to get that behavior:
<TextBox Name="StartPriceEntryForm" Grid.Row="2" Grid.Column="1"
Style="{StaticResource textStyleTextBox}" Margin="8,5,0,5">
<TextBox.Text>
<Binding Path="StartPrice" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<ExceptionValidationRule />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
The following thread has a good explanation:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=196353&SiteID=1
You can find an updated version of the Data Binding HOL sample here:
http://windowssdk.msdn.microsoft.com/library/en-us/wpf_samples/html/199e463c-99b7-4678-bbed-1fb615616571.asp frame=true
Hope this helps,
Tina