![]() Public class BsnValidationTriggerAction : TriggerAction ![]() ![]() ![]() I've once made a trigger which checks if the input is numeric and the length has to be a maximum of 9. Protected override void OnDetachingFrom(Entry bindable)īindable.TextChanged -= bindable_TextChanged ((Entry)sender).Text = e.NewTextValue.Substring(0, MaxLength) If (e.NewTextValue.Length > 0 & e.NewTextValue.Length > MaxLength) Private void bindable_TextChanged(object sender, TextChangedEventArgs e) Protected override void OnAttachedTo(Entry bindable)īindable.TextChanged += bindable_TextChanged ``` region members public static readonly BindableProperty MaxLengthProperty = BindableProperty.Create("MaxLength", typeof(int), typeof(MaxLengthValidator), 0)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |