summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2017-06-01 09:12:00 +0200
committerStephane Delcroix <stephane@delcroix.org>2017-06-01 09:21:55 +0200
commitd964b8336d863501f9810773f181419b5458447b (patch)
treefaa65834a8979d730c5dfdbd5f9958aaf54b4550 /Xamarin.Forms.Xaml
parentd29be8e9ae44e35cd3f1caec41d1c737a70dabdb (diff)
downloadxamarin-forms-d964b8336d863501f9810773f181419b5458447b.tar.gz
xamarin-forms-d964b8336d863501f9810773f181419b5458447b.tar.bz2
xamarin-forms-d964b8336d863501f9810773f181419b5458447b.zip
[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 cdf73bdd..27ef06d0 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; }
}
}