Finally I had achieved this by creating Custom render for Textbox and Text area(Editor), below code worked for me.
In forms, I have created this class.
using Xamarin.Forms;
namespace CustomRenderer
{
public class MyEntry : Entry
{
}
}
In android I created custom render for MyEntry.
using Xamarin.Forms.Platform.Android;
using Xamarin.Forms;
using CustomRenderer;
using CustomRenderer.Android;
[assembly: ExportRenderer (typeof(MyEntry), typeof(MyEntryRenderer))]
namespace CustomRenderer.Android
{
class MyEntryRenderer : EntryRenderer
{
protected override void OnElementChanged (ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged (e);
if (Control != null) {
Control.SetBackgroundColor (global::Android.Graphics.Color.LightGreen);
Control.PrivateImeOptions = "nm";
}
}
}
}
Below render for iOS.
using Xamarin.Forms.Platform.iOS;
using Xamarin.Forms;
using UIKit;
using CustomRenderer;
using CustomRenderer.iOS;
[assembly: ExportRenderer (typeof(MyEntry), typeof(MyEntryRenderer))]
namespace CustomRenderer.iOS
{
public class MyEntryRenderer : EntryRenderer
{
protected override void OnElementChanged (ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged (e);
if (Control != null) {
// do whatever you want to the UITextField here!
Control.BackgroundColor = UIColor.FromRGB (204, 153, 255);
Control.BorderStyle = UITextBorderStyle.Line;
Control.KeyboardType = UIKeyboardType.EmailAddress;
}
}
}
}
In xaml I had following syntax.
<?xml version="1.0" encoding="UTF-8" ?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CustomRenderer;assembly=CustomRenderer"
x:Class="CustomRenderer.MainPageXaml">
<StackLayout VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand">
<Label Text="Hello, Custom Renderer!" />
<local:MyEntry Text="In Shared Code" />
</StackLayout>
</ContentPage>
With above approach I had successfully disabled the Dictation button iOS and Android keyboards.