I am trying to change the background of an entry depending on the device it's running on. I tried to do it based on information from: https://developer.xamarin.com/guides/xamarin-forms/xaml/passing-arguments/
and got to this:
<Entry TextColor="White"
x:Name="entryTop"
HeightRequest="40"
WidthRequest="150"
RelativeLayout.XConstraint = "{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=.48,
Constant=10}"
RelativeLayout.YConstraint = "{ConstraintExpression Type=RelativeToParent,
Property=Height,
Factor=0,
Constant=5}" >
<Entry.BackgroundColor>
<OnPlatform x:TypeArguments="x:String">
<On Platform="Android" Value="Transparent" />
<On Platform="iOS" Value="white" />
</OnPlatform>
</Entry.BackgroundColor>
</Entry>
When I try to build my project, I get this error: No property, bindable property, or event found for BackgroundColor, or mismatching type between value and property.
I tried with color factory methods and several TypeArguments, but cannot seem to get the right ones.