/// <summary> /// Starts manipulation of the object /// </summary> public void StartHold(Vector3 downPos) { if (!IsHoldEnabled) { return; } if (isHolding || isManipulating) { return; } isHolding = true; startHandPos = downPos; // Store this in case someone asks var ea = new HoldEventArgs( currentInputSource, currentInputSourceId); RaiseHoldStartedEvent(ea); }
/// <summary> /// Stops manipulation of the object /// </summary> public void StopHold(bool exitOk = true) { if (!isHolding) { return; } isHolding = false; currentInputSource = null; var ea = new HoldEventArgs(currentInputSource, currentInputSourceId); if (exitOk) { RaiseHoldCompletedEvent(ea); } else { RaiseHoldCanceledEvent(ea); } //Debug.Log(exitOk ? "Hold completed event fired" : "Hold calceled event fired"); }
private void Hold_Hold(object sender, HoldEventArgs e) { var postit = sender as Postit; postit.Background = new SolidColorBrush(RandomHelper.GetRandomColor()); }
void hold_Hold(object sender, HoldEventArgs e) { AddRect(e.Transform.ConvertToVisual(canvastest).Center); }