-
I want to override OnPointerEnter event of TextBox, so I want to see the source code of it. But I can't find this method from TextBox.cs. I find out OnPointerEnter is a method defined in InputElement(interface) inherited by Control inherited by TextBox, but there's no such a method in Control.cs or TextBox.cs. I'm so confused. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This method is called from PointerEnter handler Why do you need Control/TextBox overrides for this event? protected virtual void OnPointerEnter(PointerEventArgs e)
{
base.OnPointerEnter(e);
// Your code.
} |
Beta Was this translation helpful? Give feedback.
This method is called from PointerEnter handler
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Input/InputElement.cs#L205
Why do you need Control/TextBox overrides for this event?
You don't need to reimplement its logic in your method, it can be as simple as: