Open RWSchwabXXX opened 1 year ago
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
Verified this on Visual Studio Enterprise 17.7.0 Preview 6.0. Repro on Windows 11(8.0.100-preview.6.23330.14), not repro on Android 13.0-API33 and iOS 16.4 with below Project: TitleviewProblemRepro.zip
Yes, the NavigationBar TitleView does not expand to occupy the entire title bar even if the HorizontalOptions of the container control is set to Fill. Issue in the Windows platform.
<NavigationPage.TitleView>
<Grid BackgroundColor="Yellow"><Label Text="Home" /></Grid>
</NavigationPage.TitleView>
Any updates on fixing this, or workarounds??
Description
When using a custom NavigationPage.TitleView compiled for Windows it displays incorrectly. partial screenshots of identical code run on Windows and Andriod are below. The windows version pushes everything to the start of the Title view and only extends the width of the encompasing grid to the largest child - rather than the width of the window. Setting HorizontalOptions on the grid (or any of the children) to fill do not change affect the display.
Windows
Android
The ImageButton also displays differently, but that is of minor importance.
Steps to Reproduce
Set the NavigationPage.TitleView in XAML for a ContentPage.
The content page is used to instantiate the main NavigationPage:
Link to public reproduction project repository
https://github.com/RWSchwabXXX/TitleviewProblemRepro
Version with bug
8.0.0-preview.6.8686
Last version that worked well
unknown
Affected platforms
Windows
Affected platform versions
windows10.0.19041.0
Did you find any workaround?
Setting the WidthRequest of the grid within the TitleView helps, but it would need to be bound to the window width.
Relevant log output
No response