Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to center a text using the TitleView feature?

$
0
0

Im trying to center a text using the new feature of forms to design our own TitleView. But strangely, we only have access to the space after the button, so centering a text offset all the text to the right because of the space of the button and the content stay uncentered... Yes, I can add a negative margin but this is not an acceptable solution since pushed navigation page got different button size than my master page... Is there a real way to center the text label? On this example, Last Entries should be center of the screen

<NavigationPage.TitleView>
        <StackLayout Orientation="Horizontal" VerticalOptions="CenterAndExpand">
            <Label Text="Last Entries" HorizontalOptions="CenterAndExpand" TextColor="White" HorizontalTextAlignment="Center" FontFamily="{StaticResource LatoRegular}"></Label>
        </StackLayout>
    </NavigationPage.TitleView>

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>