I am in the process of learning how to implement custom controls by inheriting from parent classes in C#.
I need to override the routine that is fired when the user enters text. Obviously I could add an event to trigger using TextChanged, but this seems like dirty cleanup approach to me.
I have looked into override the Text {get;set;} property, but this does not work.
Help?
You can use the
KeyDownevent. Note that users can still paste stuff in without raising aKeyDownevent. To catch all input, you need to handleTextChangedlike you thought; there’s nothing dirty about it.