【发布时间】:2017-11-03 07:56:36
【问题描述】:
我可以通过将值传递给不同设备的 OnIdiom 元素来更改字体大小。但是如何将 FontSize Medium 传递给 xaml 中的 OnIdiom,要传入的 TypeArguments 是什么。
<Style x:Name="normalFont">
<Setter Property="FontSize">
<Setter.Value>
<OnIdiom.Phone>
<OnPlatform x:TypeArguments="x:Double" iOS="Small" Android="Small" />
</OnIdiom.Phone>
<OnIdiom.Tablet>
<OnPlatform x:TypeArguments="x:Double" iOS="Medium" Android="Medium" />
</OnIdiom.Tablet>
</Setter.Value>
</Setter>
</Style>
我知道我应该放什么类型不会加倍。
【问题讨论】:
标签: xaml xamarin styles font-size