1using System.ComponentModel;
13 [TypeConverter(typeof(ReferenceTypeConverter))]
19 TapGestureRecognizer Tap =
new();
20 View.GestureRecognizers.Add(Tap);
21 Tap.Tapped += this.Tap_Tapped;
23 base.OnAttachedTo(View);
29 foreach (IGestureRecognizer Gesture
in View.GestureRecognizers)
31 if (Gesture is TapGestureRecognizer Tap)
33 Tap.Tapped -= this.Tap_Tapped;
34 View.GestureRecognizers.Remove(Tap);
39 base.OnDetachingFrom(View);
42 private void Tap_Tapped(
object? Sender, EventArgs e)
53 if (Element is not
null && Element.IsVisible)
57 if (Element is Entry Entry && Entry.Text is not
null)
58 Entry.CursorPosition = Entry.Text.Length;
Used for moving focus to the next UI component when a view has been tapped.
override void OnDetachingFrom(View View)
override void OnAttachedTo(View View)
static void FocusOn(View? Element)
Sets focus on an element.
View? SetFocusTo
The view to move focus to.