I made a visual basic User Control on WPF where some events are handled like MouseEnter or MouseLeftButtonDown inside its class.
Private Sub UCMenuButton_MouseEnter(sender As Object, e As MouseEventArgs) Handles Me.MouseEnter
gridUCMenuButton.Background = New SolidColorBrush(System.Windows.Media.Color.FromRgb(53, 53, 53))
End Sub
Well, I would like to know how can I protect those Events to forbid the caller of this class or UC from being override on the parent. I want to be the threatment of those events exclusive and unique on the class and not on the user enviroment.
I tried with
RemoveHandler event, AddressOf eventhandler
or
IsHitTestVisible="False"
but those remove completely the event calling.