summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml/XmlnsHelper.cs
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2016-09-08 20:45:43 +0200
committerJason Smith <jason.smith@xamarin.com>2016-09-08 11:45:43 -0700
commit3b7d798fdda51a669683ed7d5c3770ebf3adfa77 (patch)
tree8e4d16d91e9a6cb5a49a8aecf8514a8c84f36b97 /Xamarin.Forms.Xaml/XmlnsHelper.cs
parent85426c5d9495eb1d55b3128bf97e50c68a73b53f (diff)
downloadxamarin-forms-3b7d798fdda51a669683ed7d5c3770ebf3adfa77.tar.gz
xamarin-forms-3b7d798fdda51a669683ed7d5c3770ebf3adfa77.tar.bz2
xamarin-forms-3b7d798fdda51a669683ed7d5c3770ebf3adfa77.zip
[Xaml] support native views and native bindings (#266)
Allows including Native views directly in xaml. Support for ios, android, UWP
Diffstat (limited to 'Xamarin.Forms.Xaml/XmlnsHelper.cs')
-rw-r--r--Xamarin.Forms.Xaml/XmlnsHelper.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Xamarin.Forms.Xaml/XmlnsHelper.cs b/Xamarin.Forms.Xaml/XmlnsHelper.cs
index 778d2947..e3e37de4 100644
--- a/Xamarin.Forms.Xaml/XmlnsHelper.cs
+++ b/Xamarin.Forms.Xaml/XmlnsHelper.cs
@@ -20,15 +20,16 @@ namespace Xamarin.Forms.Xaml
string typeName;
string ns;
string asm;
+ string targetPlatform;
- ParseXmlns(xmlns, out typeName, out ns, out asm);
+ ParseXmlns(xmlns, out typeName, out ns, out asm, out targetPlatform);
return ns;
}
- public static void ParseXmlns(string xmlns, out string typeName, out string ns, out string asm)
+ public static void ParseXmlns(string xmlns, out string typeName, out string ns, out string asm, out string targetPlatform)
{
- typeName = ns = asm = null;
+ typeName = ns = asm = targetPlatform = null;
foreach (var decl in xmlns.Split(';'))
{
@@ -42,6 +43,10 @@ namespace Xamarin.Forms.Xaml
asm = decl.Substring(9, decl.Length - 9);
continue;
}
+ if (decl.StartsWith("targetPlatform=", StringComparison.Ordinal)) {
+ targetPlatform = decl.Substring(15, decl.Length - 15);
+ continue;
+ }
var nsind = decl.LastIndexOf(".", StringComparison.Ordinal);
if (nsind > 0)
{