public override void OnButtonRelease(MouseButtonEvent evt) { base.OnButtonRelease(evt); if (!IsEnabled) return; if (IsSelected && !IsTogglable) Deselect(); // if we were just clicked, we get to handle the next button release event if (evt.Button == 1 && justClicked) { justClicked = false; evt.Handle(this); QueuePaneRender(); Click(); } }
public override void OnButtonRelease(MouseButtonEvent evt) { base.OnButtonRelease(evt); if (IsSelected && !IsTogglable) { Deselect(); } // if we were just clicked, we get to handle the next button release event if (hitRegion != Region.None) { hitRegion = Region.None; evt.Handle(this); MakeDirty(); } }
public override void OnButtonPress(MouseButtonEvent evt) { base.OnButtonPress(evt); if (evt.IsHandled || !IsEnabled) return; if (evt.Button == 1 && HitTest(evt.Pos) && !justClicked) { evt.Handle(this); justClicked = true; IsSelected = true; IsFocused = true; QueuePaneRender(); } }
public override void OnButtonRelease(MouseButtonEvent evt) { base.OnButtonRelease(evt); if (_isDragging) { _isDragging = false; evt.Handle(this); } }
public override void OnButtonPress(MouseButtonEvent evt) { base.OnButtonPress(evt); if (evt.IsHandled) return; hitRegion = HitRegion(evt.Pos); if (hitRegion != Region.None) { if (IsTogglable) { if (IsSelected) Deselect(); } Select(hitRegion); evt.Handle(this); if (hitRegion == Region.Button1) RaiseAction1(); else RaiseAction2(); MakeDirty(); } }
public override void OnButtonPress(MouseButtonEvent evt) { base.OnButtonPress(evt); if (LastPosition == null) return; var relPos = evt.Pos - LastPosition; if (relPos >= IndicatorPosition && relPos <= IndicatorPosition + IndicatorSize) { _isDragging = true; evt.Handle(this); GrabFocus(); } else if (HitTest(evt.Pos)) { SetClosestValue(evt.Pos); evt.Handle(this); GrabFocus(); } }
public override void OnButtonPress(MouseButtonEvent evt) { _anchor = evt.Pos - Origin; if (_label.HitTest(evt.Pos)) { evt.Handle(this); if (Clicked != null) Clicked(this, new EventArgs()); } else { CloseButton.OnButtonPress(evt); } }
public override void OnButtonRelease(MouseButtonEvent evt) { if (evt.IsHandled) { Deselect(); return; } base.OnButtonRelease(evt); if (evt.Modifier != InteractionModifier.Shift) Deselect(); if (HitTest(evt.HitLine)) { evt.Handle(this); } }
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); } }