在Xamarin表单中为按钮FontSize使用命名字体大小

问题描述

带有标签的FontSize可以使用NameSized字体设置,例如:认,小...。

但是,当我尝试将Button FontSize设置为这些枚举时,这是无效的, 有没有办法在Xaml中做到这一点?

解决方法

Button有自己的FontSize属性。

 <Button Text="Hello" />
    <Button FontSize="Medium" Text="Hello" />

屏幕截图:

enter image description here