public override void OnButtonRelease(MouseButtonEvent evt) { base.OnButtonRelease(evt); if (Control != null) { var controlEvt = evt.Copy(); controlEvt.Pos = GetControlPoint(evt.Pos); Control.OnButtonRelease(controlEvt); if (controlEvt.IsHandled) evt.Handle(controlEvt.LastHandler); } }
public override void OnButtonPress(MouseButtonEvent evt) { base.OnButtonPress(evt); if (Control != null) { var controlEvt = evt.Copy(); controlEvt.Pos = GetControlPoint(evt.HitLine); if (evt.IsHandled) controlEvt.Handle(this); Control.OnButtonPress(controlEvt); if (controlEvt.IsHandled) evt.Handle(this); } }