Hi there,
i have a validation rule like so:
public class MyRule : ValidationRule
{
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
{
if ((int)value < 0)
{
return new ValidationResult("Error, value must be > 0");
}
else
{
return ValidationResult.Success;
}
}
}
How can I apply this to a column in a DataGrid so what it's fired when the DataGrid is bound, not just when the user changes the cell. My column
<data:DataGridTextColumn Header="BookSize" Binding="{Binding BookSize.Value}" >
</data:DataGridTextColumn>