Похоже, что кто-то еще имеет эту проблему: Validation.HasError не запускается снова, если появляется новая ошибка, в то время как уже истина
Ошибка Validation.Error не обновляется с последней ошибкойсообщение.
Показывает предыдущую ошибку, а не ту, которая была вызвана последней.Когда я регистрирую каждое возвращение, PropertyX больше или PropertyX меньше, чем возвращается, но оно не отображает это сообщение в моей подсказке.Будет отображено «Обязательно».
Я также обнаружил, что мой конвертер для всплывающей подсказки не вызывается, когда PropertyX больше или PropertyX меньше, чем возвращается.
Вот код подтверждения:
string this[string columnName]
{
get
{
switch(columnName)
{
case "Property1":
int output;
if (true == string.IsNullOrEmpty(this.Property1))
{
return "Required";
} else if (true == int.TryParse(this.Property1, out output))
{
return "Invalid integer";
} else if (true == this.Property1Int.HasValue &&
true == this.Property2Int.HasValue)
{
if (this.Property1Int.Value < this.Property2Int.Value)
{
return "Property2 is greater than Property1";
}
}
break;
case "Property2":
int output;
if (true == string.IsNullOrEmpty(this.Property2))
{
return "Required";
} else if (true == int.TryParse(this.Property2, out output))
{
return "Invalid integer";
} else if (true == this.Property1Int.HasValue &&
true == this.Property2Int.HasValue)
{
if (this.Property2Int.Value > this.Property1Int.Value)
{
return "Property2 is greater than Property1";
}
}
break;
};
return string.Empty;
}
}
Что происходит?