Skip to content

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

Open
@kazo0

Description

@kazo0

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions