From e0c3f487774f2dbdb1fecc5a3831bd794e0b1883 Mon Sep 17 00:00:00 2001 From: kingces95 Date: Fri, 22 Apr 2016 13:34:13 -0700 Subject: Windows.UI.Xaml.dll on X64 Windows.UI.Xaml.Setter.get_Value is NYI (#93) * Windows.UI.Xaml.dll on X64 Windows.UI.Xaml.Setter.get_Value is NYI * Add comment --- .../WindowsResourcesProvider.cs | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'Xamarin.Forms.Platform.WinRT.Tablet') diff --git a/Xamarin.Forms.Platform.WinRT.Tablet/WindowsResourcesProvider.cs b/Xamarin.Forms.Platform.WinRT.Tablet/WindowsResourcesProvider.cs index 9c1351b0..64041c00 100644 --- a/Xamarin.Forms.Platform.WinRT.Tablet/WindowsResourcesProvider.cs +++ b/Xamarin.Forms.Platform.WinRT.Tablet/WindowsResourcesProvider.cs @@ -44,14 +44,22 @@ namespace Xamarin.Forms.Platform.WinRT // TODO: Need to implement a stealth pass-through for things we don't support - if (setter.Property == TextBlock.FontSizeProperty) - formsStyle.Setters.Add(Label.FontSizeProperty, setter.Value); - else if (setter.Property == TextBlock.FontFamilyProperty) - formsStyle.Setters.Add(Label.FontFamilyProperty, setter.Value); - else if (setter.Property == TextBlock.FontWeightProperty) - formsStyle.Setters.Add(Label.FontAttributesProperty, ToAttributes(Convert.ToUInt16(setter.Value))); - else if (setter.Property == TextBlock.TextWrappingProperty) - formsStyle.Setters.Add(Label.LineBreakModeProperty, ToLineBreakMode((TextWrapping)setter.Value)); + try + { + if (setter.Property == TextBlock.FontSizeProperty) + formsStyle.Setters.Add(Label.FontSizeProperty, setter.Value); + else if (setter.Property == TextBlock.FontFamilyProperty) + formsStyle.Setters.Add(Label.FontFamilyProperty, setter.Value); + else if (setter.Property == TextBlock.FontWeightProperty) + formsStyle.Setters.Add(Label.FontAttributesProperty, ToAttributes(Convert.ToUInt16(setter.Value))); + else if (setter.Property == TextBlock.TextWrappingProperty) + formsStyle.Setters.Add(Label.LineBreakModeProperty, ToLineBreakMode((TextWrapping)setter.Value)); + } + catch (NotImplementedException) + { + // see https://bugzilla.xamarin.com/show_bug.cgi?id=33135 + // WinRT implementation of Windows.UI.Xaml.Setter.get_Value is not implemented. + } } return formsStyle; -- cgit v1.2.3