> Hi All,
>
[quoted text clipped - 5 lines]
> Is there a way to override an event of controller or the first text
> box of the 3?
Not really, not without the cooperation of your controller. You can
subscribe to the event if the TextBox control is public, and depending on
what you are really trying to do, you _might_ be able to cancel or
otherwise undo something that the controller does in response to the event.
For example, assuming your client class subscribes to the event after the
controller, and assuming all you want to do is handle something in the
event that the controller doesn't, or prevent the controller from
signaling that it has handled the event, then you could just set the
Handled property in the event and since your code would execute after the
controller's, you win.
But you can't stop the controller from handling the event altogether. And
even in the example I describe, it's a somewhat fragile situation, as
you're completely dependent on the assumption that the controller
subscribes to the event before you do.
If you want to override the controller's own event handling, you should
change the controller so that it's designed to allow this. That would not
be hard at all and the resulting code would be a lot more robust and
maintainable.
Pete