FIXES
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using Toolkit.Foundation;
|
||||
|
||||
namespace Toolkit.UI.WinUI;
|
||||
|
||||
public class ValidationToMessageConverter :
|
||||
ValueConverter<IReadOnlyIndexDictionary<string, string>, string?>
|
||||
{
|
||||
public string? Property { get; set; }
|
||||
|
||||
protected override string? ConvertTo(IReadOnlyIndexDictionary<string, string> value,
|
||||
Type? targetType,
|
||||
object? parameter,
|
||||
string? language)
|
||||
{
|
||||
if (Property is { Length: > 0 } && value.TryGetValue(Property, out string? message))
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user