1 fonts label listview button xamarin.forms
我想用我的应用程序的自定义字体更改我的字体系列。
在 Xamarin 文档中,我可以看到如何仅更改一个标签的字体系列,但不能更改我的整个应用程序!
我使用适用于 Android 和 IOS 的 Xamarin Forms!
我需要更改我的字体:-Listviews -Buttons -Label
谢谢
您可以使用全局样式将更改应用到应用程序中的所有元素。要更改所有 Label 元素的字体,您可以这样做:
<Application xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Styles.App">
<Application.Resources>
<ResourceDictionary>
<Style TargetType="Label">
<Setter Property="FontFamily" Value="sans-serif" />
<Setter Property="FontSize" Value="12" />
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6011 次 |
| 最近记录: |