3
设置样式值在xamarin形式风格(在XAML中定义),我可以定义值特定平台的,就像这样:Xamarin.Forms:如何只在特定平台
<OnPlatform x:TypeArguments="Font" Android="30" iOS="40" WinPhone="20" x:Key="TitleFontSize" />
<Style x:Key="MyTitleLabel" TargetType="Label"">
<Setter Property="Font" Value="{StaticResource TitleFontSize}" />
</Style>
可我还定义了风格的方式,使“字体”的价值保持默认(根本没有设置)的一些plarforms?
事情是这样的:
<Style x:Key="MyTitleLabel" TargetType="Label"">
<OnPlatform>
<OnPlatform.Android>
<Setter Property="Font" Value="30" />
</OnPlatform.Androud>
</OnPlatform>
</Style>