diff options
author | Jimmy Garrido <jimmygarrido@outlook.com> | 2017-02-17 02:40:40 -0800 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-02-17 10:40:40 +0000 |
commit | f449b31918fbc2d3525cd151ff36c27b175887a0 (patch) | |
tree | 51cfadd87eabe3a8debab756e563084fd96ef94a | |
parent | 53b1bbaf366a43832df1e941e42ca3d0b4c6fcbf (diff) | |
download | xamarin-forms-f449b31918fbc2d3525cd151ff36c27b175887a0.tar.gz xamarin-forms-f449b31918fbc2d3525cd151ff36c27b175887a0.tar.bz2 xamarin-forms-f449b31918fbc2d3525cd151ff36c27b175887a0.zip |
Fixed Title not updating on parent page (#743)
3 files changed, 46 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43527.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43527.cs new file mode 100644 index 00000000..4f894f9c --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43527.cs @@ -0,0 +1,43 @@ +using System; +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; + +#if UITEST +using Xamarin.UITest; +using NUnit.Framework; +#endif + +namespace Xamarin.Forms.Controls.Issues +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 43527, "[UWP] Detail title does not update when wrapped in a NavigationPage", PlatformAffected.WinRT)] + public class Bugzilla43527 : TestMasterDetailPage + { + protected override void Init() + { + Master = new ContentPage + { + Title = "Master", + BackgroundColor = Color.Red + }; + + Detail = new NavigationPage(new TestPage()); + } + + class TestPage : ContentPage + { + public TestPage() + { + Title = "Test Page"; + + Content = new StackLayout + { + Children = { + new Label { Text = "Hello Page" }, + new Button { Text = "Change Title", Command = new Command(() => Title = $"New Title: {DateTime.Now.Second}") } + } + }; + } + } + } +}
\ No newline at end of file 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 b3b14346..f6100c66 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 @@ -144,6 +144,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43313.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43469.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43516.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43527.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla44047.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43941.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43663.cs" /> diff --git a/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs b/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs index 185737aa..d0b5727f 100644 --- a/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs +++ b/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs @@ -314,6 +314,8 @@ namespace Xamarin.Forms.Platform.WinRT UpdateBackButtonTitle(); else if (e.PropertyName == NavigationPage.HasNavigationBarProperty.PropertyName) UpdateTitleVisible(); + else if (e.PropertyName == Page.TitleProperty.PropertyName) + UpdateTitleOnParents(); } void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) |