Skip to content

Instantly share code, notes, and snippets.

@susairajs
Created June 12, 2019 09:37
using System;
using Xamarin.Forms;
namespace XamarinCustomEntry.Controls
{
public class CustomEntry:Entry
{
public new event EventHandler Completed;
public static readonly BindableProperty ReturnTypeProperty = BindableProperty.Create(
nameof(ReturnType),
typeof(ReturnType),
typeof(CustomEntry),
ReturnType.Done,
BindingMode.OneWay
);
public ReturnType ReturnType
{
get { return (ReturnType)GetValue(ReturnTypeProperty); }
set { SetValue(ReturnTypeProperty, value); }
}
public void InvokeCompleted()
{
if (this.Completed != null)
this.Completed.Invoke(this, null);
}
}
public enum ReturnType
{
Go,
Next,
Done,
Send,
Search
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment