diff options
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs | 1 | ||||
-rw-r--r-- | Xamarin.Forms.Xaml/XamlLoader.cs | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs index dcffb3c5..cd7913ce 100644 --- a/Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs +++ b/Xamarin.Forms.Xaml.UnitTests/XamlLoaderGetXamlForTypeTests.xaml.cs @@ -28,7 +28,6 @@ namespace Xamarin.Forms.Xaml.UnitTests #pragma warning disable 0618 Xamarin.Forms.Xaml.Internals.XamlLoader.XamlFileProvider = null; #pragma warning restore 0618 - } [TestCase(false)] 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; } } } |