dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.21k stars 1.75k forks source link

[WinUI3] TitleView content does not expand across the entire width #10703

Open Agredo opened 2 years ago

Agredo commented 2 years ago

I am trying to port an app from XF with UWP to MAUI with WinUI3.

The Shell.TabView does not work correctly in MAUI. The content is not expanding horizontally. I can manually make the buttons wider but then its not more adaptive to the windows size. image

Here is the copy and pasted Xamarin Forms code for the used NavigationPage.TitleView (The old project did not use Shell) `

`
rachelkang commented 2 years ago

Potentially fixed by https://github.com/dotnet/maui/pull/10768

ghost commented 2 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

Dry-Tech commented 1 year ago

Hello, i have the same problem. It seems that the TitleView always has the width of its content, so its not possible to center an image/logo in the TitleView, or do that what @Agredo wanted to do.

daltzctr commented 1 year ago

This is not fixed still.

homeyf commented 1 year ago

Verified this issue with Visual Studio Enterprise 17.8.0 Preview 1.0. Can repro this issue with sample code.

devdeer-alex commented 10 months ago

Still an issue with VS 17.8.3

devdeer-alex commented 10 months ago

Only (very dirty!!!) workaround I found so far:

<NavigationPage.TitleView>
    <Grid WidthRequest="{Binding Source={RelativeSource Self}, Path=Window.Width}">

    </Grid>
</NavigationPage.TitleView>
schinkenwuerfel commented 7 months ago

Are there any updates on this? Seems the issue still persists in .NET8

pme442 commented 6 months ago

Any updates on this?

rezamohamed commented 5 months ago

Is this being worked on?

alex3696 commented 2 months ago

Only (very dirty!!!) workaround I found so far:

<NavigationPage.TitleView>
    <Grid WidthRequest="{Binding Source={RelativeSource Self}, Path=Window.Width}">

    </Grid>
</NavigationPage.TitleView>

Thanks for the workaround, I corrected it a bit for myself WidthRequest="{Binding Source={RelativeSource Self}, Path=Parent.Width}" or WidthRequest="{Binding Source={RelativeSource AncestorType={x:Type NavigationPage}}, Path=CurrentPage.Width}"