From 3b7d798fdda51a669683ed7d5c3770ebf3adfa77 Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Thu, 8 Sep 2016 20:45:43 +0200 Subject: [Xaml] support native views and native bindings (#266) Allows including Native views directly in xaml. Support for ios, android, UWP --- Xamarin.Forms.Core/INativeBindingService.cs | 10 ++++++++++ Xamarin.Forms.Core/INativeValueConverterService.cs | 9 +++++++++ Xamarin.Forms.Core/Xamarin.Forms.Core.csproj | 4 +++- Xamarin.Forms.Core/XamlParseException.cs | 2 +- 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 Xamarin.Forms.Core/INativeBindingService.cs create mode 100644 Xamarin.Forms.Core/INativeValueConverterService.cs (limited to 'Xamarin.Forms.Core') 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 @@ + + @@ -447,4 +449,4 @@ - \ No newline at end of file + 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; -- cgit v1.2.3