问题
I am defining a custom Shell.TitleView
in a way to preserve the Tab/Page title of my ContentPage
as follow:
<Shell.TitleView>
<Label Text="Page2" FontSize="20" VerticalTextAlignment="Center"/>
<!-- rest of my TitleView irrelevant in this question-->
</Shell.TitleView>
The issue here is that the generated title by the default Shell.TitleView
(in the second Tab) is different from mine (the difference is more noticeable when you navigate from one tab to the other than in screenshots), at first I thought it was a matter of combination between FontSize
and FontAttributes="bold"
.
Clarification
- 1st Tab: using my custom
Shell.TitleView
. - 2nd Tab: Without using/defining a
Shell.TitleView
. - I am not using any style or custom font just using the empty template project for shell flyout.
- By different I mean that the custom title text in app bar is a bit bolder, removing bold attribute won't make it same.
What is causing this difference? if it is because of different FontFamily
, then What is the FontFamilly
used by the default Shell.TitleView?
How to make it same?
EDIT
With Opacity and TextColor they are almost similiar but still not 100%.
<Shell.TitleView>
<Label Text="Page2" FontSize="20" VerticalTextAlignment="Center" FontAttributes="Bold"
Opacity="1" TextColor="White"/>
</Shell.TitleView>
来源:https://stackoverflow.com/questions/64726686/defining-shell-titleview-while-preserving-the-title-text-of-tabs-in-shell-but-s