Bug 56164 - DetailPage title not updated when dynamically changing the page Title.
Summary: DetailPage title not updated when dynamically changing the page Title.
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-05-10 09:22 UTC by Santhiya
Modified: 2017-05-10 15:35 UTC (History)
2 users (show)

Tags: uwp masterdetailpage title
Is this bug a regression?: ---
Last known good build:


Attachments
MasterDetailPage Title not updated (76.75 KB, application/x-zip-compressed)
2017-05-10 11:51 UTC, Santhiya
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Santhiya 2017-05-10 09:22:32 UTC
Hi Team,

I am trying to change the page Title on button click, but it is not changed in Xamarin.UWP. Please find my sample code

App:

MainPage = new MasterPage();

MasterPage:

public class MasterPage:MasterDetailPage
{
        public MasterPage()
        {
            ContentPage content = new ContentPage();
            content.Title = "MasterPage";
            Master = content;
           
            NavigationPage page = new NavigationPage(new Page1());
            Detail = page;
        }
 }

Page1:

public class Page1:ContentPage
{
        public Page1()
        {
            Title = "Page1";
            Button btn = new Button()
            {
                Text = "Click",
                HeightRequest = 100,
                WidthRequest = 100,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center,
                BackgroundColor = Color.Red
            };
            btn.Clicked += Btn_Clicked;
            Content = btn;
        }

 
        private void Btn_Clicked(object sender, EventArgs e)
        {
           Title = "PageTitleChanged";
        }
}

The issue is when I am using the MasterDetailPage. Is there any way to change the page title? Please suggest me.

Thanks,
Santhiya
Comment 1 Santhiya 2017-05-10 11:51:25 UTC
Created attachment 22056 [details]
MasterDetailPage Title not updated
Comment 2 Jimmy [MSFT] 2017-05-10 15:35:56 UTC
Thank you for filing this report! I was able to reproduce this issue with 2.3.4.231.

However I confirmed that this is fixed in 2.3.5-pre2 which is currently available on NuGet as a pre-release.