C#C
C#2y ago
Thalnos

Maui App looks different on different platforms

On Windows and Android it looks as desired (see screenshot), but on Mac the TitleView is empty and has no content.
<FlyoutItem Title="Customer Support" Icon="headset_blue.png">
        <ShellContent 
            Title="Customer Support"
            ContentTemplate="{DataTemplate views:CustomerSupport}"
            Route="Customer Support"
            >
            <Shell.TitleView>
                <Grid>
                    <Image HeightRequest="20" WidthRequest="20" VerticalOptions="Center" Margin="10, 0, 0, 0" HorizontalOptions="Start" Source="headset_white.png"></Image>
                    <Label FontSize="22" FontAttributes="Bold" TextColor="#FFFFFF" Margin="40, 0, 0, 0" VerticalOptions="Center" HorizontalOptions="Start" Text="Customer Support"></Label>
                    <ImageButton BackgroundColor="{StaticResource Primary}" Background="{StaticResource Primary}" BorderColor="{StaticResource Primary}" Clicked="PhoneButton_Clicked" Margin="0, 0, 22, 0" HeightRequest="20" WidthRequest="20" HorizontalOptions="End" VerticalOptions="Center" Source="phone_white.png"/>
                    <ImageButton IsVisible="{Binding NewTicketOrCallNotificationVisible}" BackgroundColor="{StaticResource Primary}" Background="{StaticResource Primary}" BorderColor="{StaticResource Primary}" Clicked="PhoneButton_Clicked" Margin="0, 12, 10, 0" HeightRequest="9" WidthRequest="9" HorizontalOptions="End" VerticalOptions="Center" Source="circle_red.png"/>
                </Grid>
            </Shell.TitleView>
        </ShellContent>
    </FlyoutItem>

I've tried to add RowDefinitions="Auto" to the Grid, which made the stuff appear on Mac, so the issue is with sizing. But when I do put it to Auto, the content of the TitleView is not centered even tho I specified VerticalOptions=Center everywhere. Any help?
image.png
Was this page helpful?