зеркало из https://github.com/DeGsoft/maui-linux.git
15 строки
386 B
C#
15 строки
386 B
C#
using System;
|
|
|
|
namespace Xamarin.Forms
|
|
{
|
|
public sealed class FileImageSourceConverter : TypeConverter
|
|
{
|
|
public override object ConvertFromInvariantString(string value)
|
|
{
|
|
if (value != null)
|
|
return (FileImageSource)ImageSource.FromFile(value);
|
|
|
|
throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(FileImageSource)));
|
|
}
|
|
}
|
|
} |