summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/ListStringTypeConverter.cs
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2016-04-26 00:03:33 +0200
committerSamantha Houts <samantha@teamredwall.com>2016-04-25 15:03:33 -0700
commit1a7a25fd76f5f73f649e1da664471c6952337eb1 (patch)
treee5f429bcb80c6ffa6d9df634fcd07a5580639bce /Xamarin.Forms.Core/ListStringTypeConverter.cs
parent843bc4727a40d6ca67127326facf2333f461da2d (diff)
downloadxamarin-forms-1a7a25fd76f5f73f649e1da664471c6952337eb1.tar.gz
xamarin-forms-1a7a25fd76f5f73f649e1da664471c6952337eb1.tar.bz2
xamarin-forms-1a7a25fd76f5f73f649e1da664471c6952337eb1.zip
Multi style classes (#134)
* [C] StyleClass is IList<string> * fix docs * this might be required
Diffstat (limited to 'Xamarin.Forms.Core/ListStringTypeConverter.cs')
-rw-r--r--Xamarin.Forms.Core/ListStringTypeConverter.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/ListStringTypeConverter.cs b/Xamarin.Forms.Core/ListStringTypeConverter.cs
new file mode 100644
index 00000000..647f0143
--- /dev/null
+++ b/Xamarin.Forms.Core/ListStringTypeConverter.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Linq;
+
+namespace Xamarin.Forms
+{
+ public class ListStringTypeConverter : TypeConverter
+ {
+ public override object ConvertFromInvariantString(string value)
+ {
+ if (value == null)
+ return null;
+
+ return value.Split(new [] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToList();
+ }
+ }
+} \ No newline at end of file