|
|
|
@ -26,7 +26,7 @@ namespace Avalonia.Data.Converters |
|
|
|
/// <inheritdoc/>
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
|
|
|
{ |
|
|
|
if (value is TIn || (value == null && TypeUtilities.AcceptsNull<TIn>())) |
|
|
|
if (TypeUtilities.CanCast<TIn>(value)) |
|
|
|
{ |
|
|
|
return _convert((TIn)value); |
|
|
|
} |
|
|
|
|