diff options
author | Paul DiPietro <paul.dipietro@me.com> | 2016-03-28 00:48:21 -0400 |
---|---|---|
committer | Paul DiPietro <paul.dipietro@me.com> | 2016-03-28 00:57:30 -0400 |
commit | 2f3ed4b027eb47439ba83d32ccbfe8bcee212b98 (patch) | |
tree | cdbbe7b717587efd343d0d416c802154cc0e6f6e /Xamarin.Forms.Platform.WP8 | |
parent | 1ee2a1d31138e6da2b048b37a01893146348b6f9 (diff) | |
download | xamarin-forms-2f3ed4b027eb47439ba83d32ccbfe8bcee212b98.tar.gz xamarin-forms-2f3ed4b027eb47439ba83d32ccbfe8bcee212b98.tar.bz2 xamarin-forms-2f3ed4b027eb47439ba83d32ccbfe8bcee212b98.zip |
[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.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.WP8/Platform.cs b/Xamarin.Forms.Platform.WP8/Platform.cs index 363c6b84..4626542f 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) |