如何在Xamarin表单中设置标签样式,使所有字体都以大写字母表示。现在,我在App.xaml中有样式,如下所示。
<ResourceDictionary>
<Style x:Key="WelcomeLabelStyle" TargetType="Label">
<Setter Property="FontFamily" Value="Fira Sans Ultra Light" />
</Style>
</ResourceDictionary>发布于 2020-10-26 19:46:38
一个简单的替代方法是在样式中使用TextTransform属性:
<ResourceDictionary>
<Style x:Key="WelcomeLabelStyle" TargetType="Label">
<Setter Property="TextTransform" Value="Uppercase"/>
</Style>
</ResourceDictionary>PS:也许在问题发布的时候,这个属性是不可用的。
https://stackoverflow.com/questions/42478787
复制相似问题