I'm trying to add a picker with a background image so I used a relative layout and added both image and picker inside the relative layout. My problem is I have a border in the environment of IOS and I have a bottom line in android device. I faced this problem in Normal Entry and solved but I used the same scenario in picker not working.
Here is the Code
<RelativeLayout Margin="0,0,0,0"
Padding="0,0,0,0"
>
<Image Source="input_mobile_code_brown.png"
x:Name="img"
RelativeLayout.XConstraint =
"{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=0,
Constant=0}"
RelativeLayout.YConstraint =
"{ConstraintExpression Type=RelativeToParent,
Property=Height,
Factor=0,
Constant=0}"
RelativeLayout.WidthConstraint =
"{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=1,
Constant=0}"
RelativeLayout.HeightConstraint =
"{ConstraintExpression Type=RelativeToParent,
Property=Height,
Factor=1,
Constant=0}"
/>
<Picker BackgroundColor="Transparent"
x:Name="picker"
Margin="10,0,0,0"
RelativeLayout.XConstraint =
"{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=0,
Constant=0}"
RelativeLayout.YConstraint =
"{ConstraintExpression Type=RelativeToParent,
Property=Height,
Factor=0,
Constant=0}"
RelativeLayout.WidthConstraint =
"{ConstraintExpression Type=RelativeToView,
ElementName=img,
Property=Width,
Factor=1,
Constant=0}"
RelativeLayout.HeightConstraint =
"{ConstraintExpression Type=RelativeToView,
ElementName=img,
Property=Height,
Factor=1,
Constant=0}"
/>
</RelativeLayout>
- This is the result
I need to remove the default border from IOS
So i made a customRenderer in IOS
protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
{
base.OnElementChanged(e);
var view = e.NewElement as CustomPicker;
this.Control.BorderStyle= UITextBorderStyle.None;
}
But still the border not removed in IOS
