|
public class CustomAutoCompleteRenderer : Syncfusion.SfAutoComplete.XForms.Droid.SfAutoCompleteRenderer
{
public CustomAutoCompleteRenderer(Context context) : base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<SfAutoComplete> e)
{
base.OnElementChanged(e);
if (Control != null)
{
Control.GetAutoEditText().InputType = Android.Text.InputTypes.ClassText | Android.Text.InputTypes.TextFlagCapWords;
}
}
} |
Hi Suganya Sethuraman,
Thanks for the reply and especially the sample. It works fine for me.
I tried to do something similar to what you sent me for UWP, but alas, I was not successful.
What would the Renderer look like in UWP?
Thanks!
Best Regards,
Will
|
public class CustomAutocompleteRenderer : SfAutoCompleteRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Syncfusion.SfAutoComplete.XForms.SfAutoComplete> e)
{
base.OnElementChanged(e);
if (Control != null)
{
Control.TextChanged += Control_TextChanged;
}
}
private void Control_TextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs e)
{
SfTextBoxExt textBox = (SfTextBoxExt)sender;
CultureInfo cultureInfo = System.Threading.Thread.CurrentThread.CurrentCulture;
TextInfo textInfo = cultureInfo.TextInfo;
textBox.Text = textInfo.ToTitleCase(textBox.Text.ToLower());
textBox.Select(textBox.Text.Length, 0);
}
} |