Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAUI] 'Window.Title' couldn't be displayed after setting ‘Window.TitleBar' #27022

Closed
Zhanglirong-Winnie opened this issue Jan 9, 2025 · 2 comments · Fixed by #27148
Closed
Assignees
Labels
area-controls-titlebar csi-new partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows 🪟 s/triaged Issue has been reviewed t/bug Something isn't working
Milestone

Comments

@Zhanglirong-Winnie
Copy link

Zhanglirong-Winnie commented Jan 9, 2025

Description

Affected Build: 17.13.0 Preview 3.0 [35708.219.main]
Affected project:
https://microsoft-my.sharepoint.com/:u:/p/v-tianlz/EYHhIT_CE7JPvlYdzCBHjygBrWviXvWZ305RgE_s6eK84Q?e=3rEAtu

Steps to Reproduce

  1. Create .net MAUI project or Run the Sample Project
  2. Add the following code in MainPage.xaml:
    <Button
	     x:Name="CounterBtn2"
	     Text="Click me2" 
	     SemanticProperties.Hint="Counts the number of times you click"
	     Clicked="OnCounterClicked2"
	     HorizontalOptions="Fill" />
  1. Change the two Button events in MainPage.xaml.cs:
        private void OnCounterClicked(object sender, EventArgs e)
	 {
	     this.Window.TitleBar = null;
	     this.Window.Title = "Title";
	 }
	
	 private void OnCounterClicked2(object sender, EventArgs e)
	 {
	    this.Window.TitleBar = new TitleBar()
	    {
	        Title = "[TitleBar.TitleBar]",
	        Subtitle = "[Title.Subtitle]",
	        BackgroundColor = Color.FromRgb(255, 255, 0)
	    };
	 }
  1. Debugging on a Windows machine
  2. Click "Click Me"->Windows title displays "Title";
  3. Click "Click Me2"->Windows title displays "[TitleBar.TitleBar]";
  4. Click "Click Me" again to observe the Windows title display;

Actually:
Windows has no “Title” display.
Image

Expected:
The Windows "Title" displays normally.
Image

Link to public reproduction project repository

https://microsoft-my.sharepoint.com/:u:/p/v-tianlz/EYHhIT_CE7JPvlYdzCBHjygBrWviXvWZ305RgE_s6eK84Q?e=3rEAtu

Version with bug

Microsoft.Maui.Controls 9.0.30-ci.main.25058.3

Is this a regression from previous behavior?

Don't know. Previous versions were blocked by this issue(9.0.22 & 9.0.0).#26396

Affected platforms

Windows

@Zhanglirong-Winnie Zhanglirong-Winnie added csi-new platform/windows 🪟 s/triaged Issue has been reviewed t/bug Something isn't working labels Jan 9, 2025
@Zhanglirong-Winnie Zhanglirong-Winnie changed the title [MAUI] Windows "Title" display abnormally [MAUI] 'Window.Title' couldn't be displayed after setting ‘Window.TitleBar' Jan 9, 2025
@jfversluis jfversluis added this to the .NET 9 SR4 milestone Jan 9, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR4, .NET 9 SR3 Jan 9, 2025
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 10, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR3, .NET 9 SR4 Jan 14, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in MAUI SDK Ongoing Jan 29, 2025
@Zhanglirong-Winnie
Copy link
Author

Hi, @PureWeen
Thank you for all you did to fix this bug.
This problem was indeed fixed in 9.0.40, but it still repro in the test of net10 Preview1 (10.0.0-preview.1.25111.11).

@PureWeen
Copy link
Member

Hi, @PureWeen Thank you for all you did to fix this bug. This problem was indeed fixed in 9.0.40, but it still repro in the test of net10 Preview1 (10.0.0-preview.1.25111.11).

yea, we branched preview1 some time ago

This should be fixed in preview2
If it's still broken in preview2 then log a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-titlebar csi-new partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows 🪟 s/triaged Issue has been reviewed t/bug Something isn't working
Projects
Status: Done
5 participants