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

[iOS][NavigationBar] Complex Content is not measured properly upon device rotation #1360

Open
kazo0 opened this issue Feb 28, 2025 · 0 comments
Labels
control/navigationbar kind/bug Something isn't working

Comments

@kazo0
Copy link
Contributor

kazo0 commented Feb 28, 2025

When setting the Content property of the NavigationBar to a complex UI element, like:

<utu:NavigationBar.Content>
    <Grid Background="Red">
      <TextBlock HorizontalAlignment="Left"
                 Text="Hello, World!" />
    </Grid>
</utu:NavigationBar.Content>

The Content is not stretching properly upon device rotation. So, if you had this NavigationBar setup on a page with an iPad we would start out in Portrait like so:

Image

And rotating to Landscape we then see:

Image

Notice the Red Grid is not properly stretching to adapt to the new NavigationBar width.

Expected behavior would be to see this after rotating to Landscape:

Image

NOTE: If the device starts out with the larger width originally (starting in Landscape), it properly stretches in both orientations:

Starting out in Landscape:

Image

Then rotating to Portrait:

Image

Sample app: NavBarContentTest.zip

@kazo0 kazo0 added control/navigationbar kind/bug Something isn't working labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
control/navigationbar kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant