summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2016-03-29 12:39:45 -0700
committerkingces95 <kingces95@users.noreply.github.com>2016-03-29 12:39:45 -0700
commitf40cf99d1ab355bfc46640cb1a56894bcf5878de (patch)
treed248fd0a8c9819b452c5f7dd327e182eb2e95a84
parent57b0f3ab3080928d2ddd2da58fc84ef7023c3651 (diff)
parent2f3ed4b027eb47439ba83d32ccbfe8bcee212b98 (diff)
downloadxamarin-forms-f40cf99d1ab355bfc46640cb1a56894bcf5878de.tar.gz
xamarin-forms-f40cf99d1ab355bfc46640cb1a56894bcf5878de.tar.bz2
xamarin-forms-f40cf99d1ab355bfc46640cb1a56894bcf5878de.zip
Merge pull request #23 from xamarin/fix-bugzilla25234
[WP8] CustomMessageBox dismissal no longer causes black SystemTray
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25234.cs35
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
-rw-r--r--Xamarin.Forms.Platform.WP8/Platform.cs10
3 files changed, 46 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25234.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25234.cs
new file mode 100644
index 00000000..b29cbd33
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25234.cs
@@ -0,0 +1,35 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 25234, "Use of CustomMessageBox resets SystemTray BackgroundColor to black", PlatformAffected.WinPhone)]
+ public class Bugzilla25234 : TestContentPage
+ {
+ protected override void Init()
+ {
+ Content = new StackLayout
+ {
+ Children =
+ {
+ new Button
+ {
+ Text = "Click for Alert",
+ Command = new Command(() =>
+ {
+ DisplayAlert("Display Alert",
+ "If the theme is set to light on WP8, the status bar should return to the white color when closed", "OK");
+ })
+ }
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 75ace128..0a2d251b 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -19,6 +19,7 @@
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla22401.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla24769.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla25234.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla25662.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla26501.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla26868.cs" />
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)