summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WP8
diff options
context:
space:
mode:
authorPaul DiPietro <paul.dipietro@me.com>2016-03-28 04:48:21 (GMT)
committerPaul DiPietro <paul.dipietro@me.com>2016-03-28 04:57:30 (GMT)
commit2f3ed4b027eb47439ba83d32ccbfe8bcee212b98 (patch)
treecdbbe7b717587efd343d0d416c802154cc0e6f6e /Xamarin.Forms.Platform.WP8
parent1ee2a1d31138e6da2b048b37a01893146348b6f9 (diff)
downloadxamarin-forms-2f3ed4b027eb47439ba83d32ccbfe8bcee212b98.zip
xamarin-forms-2f3ed4b027eb47439ba83d32ccbfe8bcee212b98.tar.gz
xamarin-forms-2f3ed4b027eb47439ba83d32ccbfe8bcee212b98.tar.bz2
[WP8] CustomMessageBox dismissal no longer causes black SystemTray
The CustomMessageBox was having an interaction with WP8 where its dismissal was changing the SystemTray's background color to black. It appears that the SystemTray's background color was never set, despite its appearing white prior to the use of a CustomMessageBox.
Diffstat (limited to 'Xamarin.Forms.Platform.WP8')
-rw-r--r--Xamarin.Forms.Platform.WP8/Platform.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.WP8/Platform.cs b/Xamarin.Forms.Platform.WP8/Platform.cs
index 363c6b8..4626542 100644
--- a/Xamarin.Forms.Platform.WP8/Platform.cs
+++ b/Xamarin.Forms.Platform.WP8/Platform.cs
@@ -42,6 +42,7 @@ namespace Xamarin.Forms.Platform.WinPhone
_renderer = new Canvas();
_renderer.SizeChanged += RendererSizeChanged;
+ _renderer.Loaded += (sender, args) => UpdateSystemTray();
_tracker.CollectionChanged += (sender, args) => UpdateToolbarItems();
@@ -483,6 +484,15 @@ namespace Xamarin.Forms.Platform.WinPhone
}
}
+ void UpdateSystemTray()
+ {
+ var lightThemeVisibility = (Visibility)System.Windows.Application.Current.Resources["PhoneLightThemeVisibility"];
+ if (lightThemeVisibility == Visibility.Visible && SystemTray.BackgroundColor == System.Windows.Media.Color.FromArgb(0, 0, 0, 0))
+ {
+ SystemTray.BackgroundColor = System.Windows.Media.Color.FromArgb(1, 255, 255, 255);
+ }
+ }
+
void UpdateToolbarItems()
{
if (_page.ApplicationBar == null)