diff options
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT/LabelRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.WinRT/LabelRenderer.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/LabelRenderer.cs b/Xamarin.Forms.Platform.WinRT/LabelRenderer.cs index 1f2f861d..3997e7e4 100644 --- a/Xamarin.Forms.Platform.WinRT/LabelRenderer.cs +++ b/Xamarin.Forms.Platform.WinRT/LabelRenderer.cs @@ -34,6 +34,7 @@ namespace Xamarin.Forms.Platform.WinRT public class LabelRenderer : ViewRenderer<Label, TextBlock> { bool _fontApplied; + bool _isInitiallyDefault; protected override Windows.Foundation.Size ArrangeOverride(Windows.Foundation.Size finalSize) { @@ -71,6 +72,8 @@ namespace Xamarin.Forms.Platform.WinRT SetNativeControl(new TextBlock()); } + _isInitiallyDefault = Element.IsDefault(); + UpdateText(Control); UpdateColor(Control); UpdateAlign(Control); @@ -134,7 +137,7 @@ namespace Xamarin.Forms.Platform.WinRT return; #pragma warning disable 618 - Font fontToApply = label.IsDefault() ? Font.SystemFontOfSize(NamedSize.Medium) : label.Font; + Font fontToApply = label.IsDefault() && _isInitiallyDefault ? Font.SystemFontOfSize(NamedSize.Medium) : label.Font; #pragma warning restore 618 textBlock.ApplyFont(fontToApply); |