private void MaxThumb_DragCompleted(object sender, DragCompletedEventArgs e) { UpdateMaxThumb(RangeMax); Canvas.SetZIndex(MinThumb, 0); Canvas.SetZIndex(MaxThumb, 10); DragCompleted?.Invoke(this, EventArgs.Empty); }
void ISliderController.SendDragCompleted() { if (IsEnabled) { DragCompletedCommand?.Execute(null); DragCompleted?.Invoke(this, null); } }
void ISlider.DragCompleted() { if (IsEnabled) { DragCompletedCommand?.Execute(null); DragCompleted?.Invoke(); } }
void SendDragCompleted() { if (IsEnabled) { DragCompletedCommand?.Execute(null); DragCompleted?.Invoke(this, null); } }
private void CompleteDrag(double x, double y) { IsDragging = false; DragCompleted?.Invoke( this, new DragCompletedEventArgs( ViewHelper.PhysicalToLogicalPixels(x - _startX), ViewHelper.PhysicalToLogicalPixels(y - _startY) , false ) ); }
private void CeaseDragging(bool isCancellation) { ; if (isCaptured) { isCaptured = false; Mouse.Capture(this, CaptureMode.None); ReleaseMouseCapture(); var currentPosition = GetMousePosition(); DragCompleted?.Invoke(this, new DragCompletedEventArgs(currentPosition.X - startPosition.X, currentPosition.Y - startPosition.Y, isCancellation)); } }
private void CanvasView_Touch(object sender, SKTouchEventArgs e) { if (e.ActionType == SKTouchAction.Entered || e.ActionType == SKTouchAction.Pressed) { DragStarted?.Invoke(this, new EventArgs()); } if (e.ActionType == SKTouchAction.Exited || e.ActionType == SKTouchAction.Released) { DragCompleted?.Invoke(this, new EventArgs()); } var dis = GetDistance(Center.X, e.Location.X, Center.Y, e.Location.Y); float adjustedRadius = (MinorAxisLength / 2) - arcPadding; if (dis < (adjustedRadius + KnobRadius)) { var angle = (float)(GetAngle(Center.X, e.Location.X, Center.Y, e.Location.Y) + 120) % 360; //Debug.WriteLine($"Angle:{angle % 360}"); float sweepAngle = (startAngle + angle) % 360; // the current endpoint of the draw arc //Debug.WriteLine($"sweepAngle:{sweepAngle }"); var sweepPercent = sweepAngle / 300; // Debug.WriteLine($"sweepPercent:{sweepPercent}"); double newValue; if (Min < 0) { newValue = ((Max - Min) * sweepPercent) + Min; } else { newValue = ((Max - Min) * sweepPercent) + Min; } if (newValue <= Max) { Value = Math.Round(newValue, Precision); } else if (sweepAngle < 320) { Value = Max; } else if (sweepAngle > 340) { Value = Min; } } e.Handled = true; }
public override void EndTracking(UITouch uitouch, UIEvent uievent) { _lowerHandle.Highlighted = false; _upperHandle.Highlighted = false; if (StepValue > 0) { _stepValueInternal = StepValue; SetLowerValue(LowerValue, true); SetUpperValue(UpperValue, true); } SendActionForControlEvents(UIControlEvent.ValueChanged); DragCompleted?.Invoke(this, EventArgs.Empty); }
/// <summary> /// This is called when the user either releases his touch or the touch is canceled. /// </summary> private void OnStopTrackingTouch() { _isDragging = false; DragCompleted?.Invoke(this, EventArgs.Empty); }
protected void RaiseDRCompleted(object sender, DragCompletedEventArgs dragCompletedEventArgs) { DragCompleted?.Invoke(this, dragCompletedEventArgs); }
public void OnDragCompleted() { DragCompleted?.Invoke(this, EventArgs.Empty); }
protected override void OnThumbDragCompleted(DragCompletedEventArgs e) { base.OnThumbDragCompleted(e); DragCompleted?.Invoke(this, e); }
public override void OrganiseOnDragCompleted(DragablzItemsControl requestor, Size measureBounds, IEnumerable <DragablzItem> siblingItems, DragablzItem dragItem) { DragCompleted?.Invoke(); base.OrganiseOnDragCompleted(requestor, measureBounds, siblingItems, dragItem); }
internal void CompleteDrag(Point location) { IsDragging = false; DragCompleted?.Invoke(this, new DragCompletedEventArgs(location.X - _startLocation.X, location.Y - _startLocation.Y, false)); }
protected virtual void OnDragCompleted() { _isDragging = false; DragCompleted?.Invoke(this, EventArgs.Empty); }