[UWP] Fix Transparent Default Button (#468)
authorJimmy Garrido <jimmygarrido@outlook.com>
Tue, 8 Nov 2016 15:38:17 +0000 (07:38 -0800)
committerStephane Delcroix <stephane@delcroix.org>
Tue, 8 Nov 2016 15:38:17 +0000 (16:38 +0100)
Xamarin.Forms.Platform.WinRT/FormsButton.cs

index ffe75d4..b765948 100644 (file)
@@ -74,7 +74,9 @@ namespace Xamarin.Forms.Platform.WinRT
 
                void UpdateBackgroundColor()
                {
-                       Background = Color.Transparent.ToBrush();
+                       if (BackgroundColor == null)
+                               BackgroundColor = Background;
+
 #if WINDOWS_UWP
                        if (_contentPresenter != null)
                                _contentPresenter.Background = BackgroundColor;
@@ -82,6 +84,7 @@ namespace Xamarin.Forms.Platform.WinRT
                        if (_border != null)
                                _border.Background = BackgroundColor;
 #endif
+                       Background = Color.Transparent.ToBrush();
                }
 
                void UpdateBorderRadius()