Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Stylise the page title text

$
0
0

Hi

Xamarin Forms 4.8. VS 2019 16.7.0.

I am trying to stylise the page title text such as font size and alignment using NavigationPage.TitleView. I am using below code for my page but its not working. This is the result when page is running;

What am I missing?

Thanks

Regards

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             Title="This text shows"             
             Shell.TabBarIsVisible="False"
             x:Class="StaffApp.Views.MainPage">

    <NavigationPage.TitleView>
        <Label Text="This text does not show" FontSize="15" FontAttributes="None" HorizontalTextAlignment="Center" />
    </NavigationPage.TitleView>

    <ContentPage.Content>
        <StackLayout>
            <Label Text="Welcome to App Home Page"
                VerticalOptions="CenterAndExpand" 
                HorizontalOptions="CenterAndExpand" />
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

Viewing all articles
Browse latest Browse all 77050

Trending Articles



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