summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/WebViewSourceTypeConverter.cs
blob: 5955eb140d1053b74cd251af3eb4ba650c27dc6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System;

namespace Xamarin.Forms
{
	public class WebViewSourceTypeConverter : TypeConverter
	{
		public override object ConvertFromInvariantString(string value)
		{
			if (value != null)
				return new UrlWebViewSource { Url = value };

			throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(Color)));
		}
	}
}