summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2017-06-01 07:12:00 (GMT)
committerGitHub <noreply@github.com>2017-06-01 07:12:00 (GMT)
commit6e732fbe746a3d69bb48c70e3ec3d1d6e30b665e (patch)
treecc7d0e44521386e22d785d6410ea5dc1d9312805 /Xamarin.Forms.Xaml
parent4cde4ecb6c26318faeba8988ccb2bb162dded560 (diff)
downloadxamarin-forms-6e732fbe746a3d69bb48c70e3ec3d1d6e30b665e.zip
xamarin-forms-6e732fbe746a3d69bb48c70e3ec3d1d6e30b665e.tar.gz
xamarin-forms-6e732fbe746a3d69bb48c70e3ec3d1d6e30b665e.tar.bz2
[previewer] make sure we do not crash even if the previewer doesn't s… (#946)
* [previewer] make sure we do not crash even if the previewer doesn't sets the flag * make the tests pass
Diffstat (limited to 'Xamarin.Forms.Xaml')
-rw-r--r--Xamarin.Forms.Xaml/XamlLoader.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Xamarin.Forms.Xaml/XamlLoader.cs b/Xamarin.Forms.Xaml/XamlLoader.cs
index cdf73bd..27ef06d 100644
--- a/Xamarin.Forms.Xaml/XamlLoader.cs
+++ b/Xamarin.Forms.Xaml/XamlLoader.cs
@@ -39,7 +39,17 @@ namespace Xamarin.Forms.Xaml.Internals
[Obsolete ("Replaced by ResourceLoader")]
public static class XamlLoader
{
- public static Func<Type, string> XamlFileProvider { get; internal set; }
+ static Func<Type, string> xamlFileProvider;
+
+ public static Func<Type, string> XamlFileProvider {
+ get { return xamlFileProvider; }
+ internal set {
+ xamlFileProvider = value;
+ //¯\_(ツ)_/¯ the previewer forgot to set that bool
+ DoNotThrowOnExceptions = value != null;
+ }
+ }
+
internal static bool DoNotThrowOnExceptions { get; set; }
}
}