e.Handled = false moved before if-clause.
buttonsWrapPanel is used instead of sender.