summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2016-11-16 12:14:00 -0800
committerGitHub <noreply@github.com>2016-11-16 12:14:00 -0800
commit20adf7ec74c02f8522b12c14dbb1b5eec3a0dfee (patch)
tree92efe42b8cbc1a99eea00e6bf968b75922e98b01 /Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs
parente5af21fdc32972d4355af86349d446a2bb6a5b02 (diff)
downloadxamarin-forms-20adf7ec74c02f8522b12c14dbb1b5eec3a0dfee.tar.gz
xamarin-forms-20adf7ec74c02f8522b12c14dbb1b5eec3a0dfee.tar.bz2
xamarin-forms-20adf7ec74c02f8522b12c14dbb1b5eec3a0dfee.zip
[iOS] Add Platform Specific option to not adjust the status bar text color based on the luminosity of the NavigationBar text color (#517)
* Add reproduction for 37431 * [Core] Add iOS PS StatusBarTextColorMode * [iOS] Implement StatusBarTextColorMode on NavPage * Add reproduction for 44777 * Add instructions to 44777 repro * Update docs
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs
new file mode 100644
index 00000000..100f0e9d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs
@@ -0,0 +1,29 @@
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+using Xamarin.Forms.PlatformConfiguration;
+using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 44777, "BarTextColor changes color for more than just the Navigation page")]
+ public class Bugzilla44777 : TestMasterDetailPage
+ {
+ protected override void Init()
+ {
+ Master = new ContentPage() { Title = "I am a master page" };
+ Detail = new NavigationPage(new ContentPage { Content = new Label { Text = "The status bar text color on this page should be white on blue. When you show the Master page fully, the status bar text should be black on white. If the status bar text remains white when the Master page is fully presented, this test has failed." } });
+ ((NavigationPage)Detail).BarBackgroundColor = Color.Blue;
+ ((NavigationPage)Detail).BarTextColor = Color.White;
+
+ IsPresentedChanged += (sender, e) =>
+ {
+ var mp = sender as MasterDetailPage;
+ if (mp.IsPresented)
+ ((NavigationPage)mp.Detail).On<iOS>().SetStatusBarTextColorMode(StatusBarTextColorMode.DoNotAdjust);
+ else
+ ((NavigationPage)mp.Detail).On<iOS>().SetStatusBarTextColorMode(StatusBarTextColorMode.MatchNavigationBarTextLuminosity);
+ };
+ }
+ }
+} \ No newline at end of file