From reading EventSetter you will need to have a dummy event that sets e.Handled. EventSetter states: "Event setting handlers from the style specified as BasedOn will be called after the handlers in the immediate style." Thus, this will not trigger any EventSetter in your BaseOnOn unless it is designated as HandledEventsToo.
<Style TargetType="{x:Type TextBox}"
x:Key="EatEvents"
BasedOn="{StaticResource OtherStyle}">
<EventSetter Event="Click" Handler="EatEventsHandler"/>
</Style>
public void EatEventsHandler(object sender, RoutedEventArgs e)
{
e.Handled = true;
}
source
share