summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core
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.Core
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.Core')
-rw-r--r--Xamarin.Forms.Core/INativeBindingService.cs10
-rw-r--r--Xamarin.Forms.Core/INativeValueConverterService.cs9
-rw-r--r--Xamarin.Forms.Core/Xamarin.Forms.Core.csproj4
-rw-r--r--Xamarin.Forms.Core/XamlParseException.cs2
4 files changed, 23 insertions, 2 deletions
diff --git a/Xamarin.Forms.Core/INativeBindingService.cs b/Xamarin.Forms.Core/INativeBindingService.cs
new file mode 100644
index 00000000..d926dae4
--- /dev/null
+++ b/Xamarin.Forms.Core/INativeBindingService.cs
@@ -0,0 +1,10 @@
+namespace Xamarin.Forms.Xaml
+{
+
+ interface INativeBindingService
+ {
+ bool TrySetBinding(object target, string propertyName, BindingBase binding);
+ bool TrySetBinding(object target, BindableProperty property, BindingBase binding);
+ bool TrySetValue(object target, BindableProperty property, object value);
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/INativeValueConverterService.cs b/Xamarin.Forms.Core/INativeValueConverterService.cs
new file mode 100644
index 00000000..4309be9a
--- /dev/null
+++ b/Xamarin.Forms.Core/INativeValueConverterService.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace Xamarin.Forms.Xaml
+{
+ interface INativeValueConverterService
+ {
+ bool ConvertTo(object value, Type toType, out object nativeValue);
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
index 9e961521..a07b88ca 100644
--- a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
+++ b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj
@@ -433,6 +433,8 @@
<Compile Include="ListStringTypeConverter.cs" />
<Compile Include="PoppedToRootEventArgs.cs" />
<Compile Include="NativeBindingHelpers.cs" />
+ <Compile Include="INativeValueConverterService.cs" />
+ <Compile Include="INativeBindingService.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<ItemGroup>
@@ -447,4 +449,4 @@
</PostBuildEvent>
</PropertyGroup>
<ItemGroup />
-</Project> \ No newline at end of file
+</Project>
diff --git a/Xamarin.Forms.Core/XamlParseException.cs b/Xamarin.Forms.Core/XamlParseException.cs
index 42e8b618..d953da0f 100644
--- a/Xamarin.Forms.Core/XamlParseException.cs
+++ b/Xamarin.Forms.Core/XamlParseException.cs
@@ -7,7 +7,7 @@ namespace Xamarin.Forms.Xaml
{
readonly string _unformattedMessage;
- public XamlParseException(string message, IXmlLineInfo xmlInfo) : base(FormatMessage(message, xmlInfo))
+ public XamlParseException(string message, IXmlLineInfo xmlInfo, Exception innerException = null) : base(FormatMessage(message, xmlInfo), innerException)
{
_unformattedMessage = message;
XmlInfo = xmlInfo;