[MediaContent] Fix description of Delete method (#866)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / XamlBinding / UriTypeConverter.cs
1 using System;
2
3 namespace Tizen.NUI.Binding
4 {
5     [Xaml.ProvideCompiled("Tizen.NUI.Core.XamlC.UriTypeConverter")]
6     [Xaml.TypeConversion(typeof(Uri))]
7     internal class UriTypeConverter : TypeConverter
8     {
9         public override object ConvertFromInvariantString(string value)
10         {
11             if (string.IsNullOrWhiteSpace(value))
12                 return null;
13             return new Uri(value, UriKind.RelativeOrAbsolute);
14         }
15
16         bool CanConvert(Type type)
17         {
18             if (type == typeof(string))
19                 return true;
20             if (type == typeof(Uri))
21                 return true;
22
23             return false;
24         }
25     }
26 }