Hi there:
I'm studying validation and I ran across this xaml code:
<TextBox x:Name="AddressBox"><TextBox.Text><Binding ElementName="This" Path="IPAddress" UpdateSourceTrigger="PropertyChanged"><Binding.ValidationRules><local:IPv4ValidationRule /></Binding.ValidationRules></Binding></TextBox.Text><Validation.ErrorTemplate><ControlTemplate><StackPanel><!-- Placeholder for the TextBox itself --><AdornedElementPlaceholder x:Name="textBox"/><TextBlock Text="{Binding [0].ErrorContent}" Foreground="Red"/></StackPanel></ControlTemplate></Validation.ErrorTemplate></TextBox>
The TextBlock used to show errors has it's Text property bound to [0].ErrorContent, why the use of [0] instead of the identifier for some collection, I guess it's Validation.Errors or something, in this case, why not using something like Validation.Errors[0].ErrorContent,
and why wpf allows indexing a non identified property?
Rafael
Believe you can do it, and you will!!