// </Snippet_ManipulationItem_OnLostMouseCapture> // <Snippet_ManipulationItem_OnManipulationStarted> #region OnManipulationStarted private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { if (inertiaProcessor.IsRunning) { inertiaProcessor.Complete(Timestamp); } }
/// <summary> /// Here when manipulation starts. /// </summary> private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { if (!CanManipulate) { return; } }
private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { PushEvent(new ManipulationStartedEventArgs( _manipulationDevice, LastTimestamp, _currentContainer, new Point(e.OriginX, e.OriginY))); }
/// <summary> /// Here when manipulation starts. /// </summary> private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { }
/// <summary> /// Handles the Affine2DManipulationStarted event of the ManipulationProcessor control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.Input.ManipulationStartedEventArgs"/> instance containing the event data.</param> private void ContentManipulationProcessor_Affine2DManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { if (_inertiaTimer.IsEnabled) { _inertiaTimer.Stop(); _inertiaProcessor.Complete(DateTime.UtcNow.Ticks); } }
/// <summary> /// Unused /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnAffine2DManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { }
//==========================================================// /// <summary> /// Event handler for the manipulation processor's delta event. /// Occurs whenever the first time that the manipulation processor processes a /// group of manipulators. /// </summary> /// <param name="sender">The manipulation processor that raised the event.</param> /// <param name="e">The event args for the event.</param> private void OnAffine2DManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { Debug.Assert(!extrapolating); manipulating = true; if (canRotate || canRotateFlick) { manipulationProcessor.Pivot = new ManipulationPivot2D { X = transformedCenter.X, Y = transformedCenter.Y, Radius = Math.Max(Width, Height)/2.0f }; } }
/******************************************************************************/ #region Test private void OnManipulationStarted2(object sender, Manipulation2DStartedEventArgs e) { ScreenMessage(String.Format("Started: Origin: {0}x{1} {2}", e.OriginX, e.OriginY, Timestamp)); }
/// <summary> /// Here when manipulation starts. /// </summary> private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { StopInertia(); }
//==========================================================// /// <summary> /// Event handler for the manipulation processor's delta event. /// Occurs whenever the first time that the manipulation processor processes a /// group of manipulators /// </summary> /// <param name="sender">The manipulation processor that raised the event</param> /// <param name="e">The event args for the event</param> private void OnAffine2DManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { if (extrapolating) { StopInertia(); } manipulating = true; if (canRotate || canRotateFlick) { manipulationProcessor.Pivot = new ManipulationPivot2D { X = center.X, Y = center.Y, Radius = Math.Max(ActualSize.X, ActualSize.Y) / 2.0f, }; } }
/** Manipulation Events ********/ #region ManipulationEvents private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e) { if (pickedObject != null) this.beginPos = pickedObject.Position; ; }