I have a UI where the placeholder text fits the search bar. This is the UI which I need.

[![](https://i.stack.imgur.com/Ijmwt.png)](https://i.stack.imgur.com/Ijmwt.png)

This is my UI

[![](https://i.stack.imgur.com/x8wGs.jpg)](https://i.stack.imgur.com/x8wGs.jpg)

This is my custom renderer code

```
[assembly: ExportRenderer(typeof(searchTab), typeof(StyledSearchBarRenderer))]
namespace RestaurantApp.Droid.Renderers
{
#pragma warning disable CS0618 // Type or member is obsolete
    class StyledSearchBarRenderer : SearchBarRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<SearchBar> e)
        {
            base.OnElementChanged(e);
            if (Control != null)
            {
                var color = global::Xamarin.Forms.Color.LightGray;

                var searchView = Control as SearchView;

                int searchPlateId = searchView.Context.Resources.GetIdentifier("android:id/search_plate", null, null);
                Android.Views.View searchPlateView = searchView.FindViewById(searchPlateId);
                searchPlateView.SetBackgroundColor(Android.Graphics.Color.Transparent);

                int searchIconId = Context.Resources.GetIdentifier("android:id/search_mag_icon", null, null);
                ImageView searchViewIcon = (ImageView)searchView.FindViewById<ImageView>(searchIconId);
                searchViewIcon.SetImageDrawable(null);

            }
        }
    }
#pragma warning restore CS0618 // Type or member is obsolete
}

```

This is my XAML code

```
 <Frame CornerRadius="10" Padding="0" OutlineColor="DarkGray" HasShadow="True" HorizontalOptions="Fill"  Margin="10,0,10,0" VerticalOptions="Center">
                <local:searchTab x:Name="searchBar"  Placeholder="Please search for a vendor or product name" PlaceholderColor="Black" TextColor="Black" HorizontalOptions="FillAndExpand" VerticalOptions="Center" />

            </Frame>

```

I don't know how to fix this. Any suggestions?