Propagate any Page.Title to the window, not just for Shell
Description of Change
Trying to fix the empty title bar in Blazor Hybrid templates by updating the Title property in the Window.cs file. I don't think there is any reason to cast it specifically to Shell as each Page could have a title.
Verified this change works! 👇
Issues Fixed
Fixes #25337
@PureWeen OK so why do we do it for Shell and not the rest? Because Shell is just the singular thing that people will have?
You can still set the Window one and that will take precedence?
Just thinking about the File > New experience I guess, now we need one other place where I need to scrub the default template values to make the title show up nicely?
I don't have a strong opinion either way. @Eilon?
@PureWeen OK so why do we do it for Shell and not the rest? Because Shell is just the singular thing that people will have?
You can still set the Window one and that will take precedence?
Just thinking about the File > New experience I guess, now we need one other place where I need to scrub the default template values to make the title show up nicely?
I don't have a strong opinion either way. @Eilon?
Shell == Window
It's your entire window context
Shell basically represented Window in XF before we had the concept of a Window.
If we want Blazor to have a Window title it should go here https://github.com/dotnet/maui/blob/net9.0/src/Templates/src/templates/maui-blazor/App.xaml.cs#L10-L13
So like this? https://github.com/dotnet/maui/pull/25387
@PureWeen / @jfversluis - so I guess we can close this if it's considered just a legacy behavior?