我从以下xaml中遇到了UWP的奇怪错误:
<sfPager:SfDataPager.HeightRequest>
<OnPlatform x:TypeArguments="x:Double"
UWP="40"
Android="50"
iOS="50"/>
</sfPager:SfDataPager.HeightRequest>
编译时出现以下错误:
No property, bindable property, or event found for 'UWP', or mismatching type between value and property.
我在这里做错什么了!!
答案 0 :(得分:1)
OnPlatform的平台差异:
<OnPlatform x:TypeArguments="x:Double">
<On Platform="UWP" Value="40"></On>
<On Platform="Android" Value="50"></On>
<On Platform="iOS" Value="50"></On>
</OnPlatform>
答案 1 :(得分:1)
<sfPager.SfDataPager HeightRequest="{OnPlatform UWP=40, iOS=50, Android=50}"