Created
June 12, 2019 09:37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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