我想为我的ShellContent中的每个app.xaml元素应用一种通用的样式。
我的问题是我没有在我的ShellContent中看到任何TargetType属性
AppShell.xaml
<ShellContent Title="TITLE1"
ContentTemplate="{DataTemplate local:Page1}"
Route="Route1"
Icon="Icon1" />
<ShellContent Title="TITLE2"
ContentTemplate="{DataTemplate local:Page2}"
Route="Route2"
Icon="Icon2" />我想要这种风格的东西在我的App.xaml
<Style TargetType="ShellContent">
<Setter Property="Title" Value="{StaticResource Black}" />
</Style>

发布于 2022-11-14 19:20:49
在合并为Styles.xaml的App.xaml中,查找并更改应用于Shell的样式
<Style TargetType="Shell" ApplyToDerivedTypes="True">
<Setter Property="Shell.TitleColor" Value="HotPink" />
<!--TBD_WHAT_PROPERTY?? <Setter Property="Shell.FontFamily" Value="..." /> --/>
</Style>这将改变ShellContents标题的颜色,在选项卡上(在Android上,而不是在Windows?)和每一页上。
不幸的是,我没有找到任何方法来改变飞离的属性。
不幸的是,我没有找到任何方法来改变使用的字体。
https://stackoverflow.com/questions/74435654
复制相似问题