1using System.ComponentModel;
14 [TypeConverter(typeof(ReferenceTypeConverter))]
20 if (View is Controls.ImageButton ImageButton)
21 ImageButton.Clicked += this.Button_Clicked;
22 else if (View is Button Button)
23 Button.Clicked += this.Button_Clicked;
25 base.OnAttachedTo(View);
31 if (View is Controls.ImageButton ImageButton)
32 ImageButton.Clicked -= this.Button_Clicked;
33 else if (View is Button Button)
34 Button.Clicked -= this.Button_Clicked;
36 base.OnDetachingFrom(View);
39 private void Button_Clicked(
object? Sender, EventArgs e)
52 if (Element is not
null && Element.IsVisible)
Base class that references services in the app.
Used for unfocusing an input control.
static void Unfocus(View? Element)
Sets focus on an element.
override void OnAttachedTo(View View)
View? UnfocusControl
The view to unfocus.
override void OnDetachingFrom(View View)