diff options
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTextField.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTextField.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTextField.cs index af60712..43d2e83 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTextField.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/UnderlinedTextField.cs @@ -5,6 +5,8 @@ using CoreGraphics; namespace Xamarin.PropertyEditing.Mac { internal interface IUnderliningTabView { + event EventHandler Clicked; + bool Selected { get; set; } int LineWidth { get; set; } } @@ -20,6 +22,8 @@ namespace Xamarin.PropertyEditing.Mac this.name = name; } + public event EventHandler Clicked; + private bool selected; public bool Selected { @@ -68,6 +72,12 @@ namespace Xamarin.PropertyEditing.Mac } } + public override void MouseDown (NSEvent theEvent) + { + Clicked?.Invoke (this, EventArgs.Empty); + base.MouseDown (theEvent); + } + private readonly IHostResourceProvider hostResources; private readonly string name; } @@ -82,6 +92,8 @@ namespace Xamarin.PropertyEditing.Mac Alignment = NSTextAlignment.Center; } + public event EventHandler Clicked; + private bool selected; public bool Selected { @@ -107,6 +119,12 @@ namespace Xamarin.PropertyEditing.Mac } } + public override void MouseDown (NSEvent theEvent) + { + Clicked?.Invoke (this, EventArgs.Empty); + base.MouseDown (theEvent); + } + public override void DrawRect (CGRect dirtyRect) { base.DrawRect (dirtyRect); |