Defining Shell.TitleView while preserving the title text of tabs in shell, but seems showing in a different font

岁酱吖の 提交于 2021-02-11 12:37:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!