// </Snippet_ManipulationItem_OnLostMouseCapture>

        // <Snippet_ManipulationItem_OnManipulationStarted>
        #region OnManipulationStarted
        private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e)
        {
            if (inertiaProcessor.IsRunning)
            {
                inertiaProcessor.Complete(Timestamp);
            }
        }
예제 #2
0
 /// <summary>
 /// Here when manipulation starts.
 /// </summary>
 private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e)
 {
     if (!CanManipulate)
     {
         return;
     }
 }
예제 #3
0
 private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e)
 {
     PushEvent(new ManipulationStartedEventArgs(
                   _manipulationDevice,
                   LastTimestamp,
                   _currentContainer,
                   new Point(e.OriginX, e.OriginY)));
 }
예제 #4
0
 private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e)
 { 
     PushEvent(new ManipulationStartedEventArgs( 
         _manipulationDevice,
         LastTimestamp, 
         _currentContainer,
         new Point(e.OriginX, e.OriginY)));
 }
예제 #5
0
 /// <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);
     }
 }
예제 #7
0
 /// <summary>
 /// Unused
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnAffine2DManipulationStarted(object sender, Manipulation2DStartedEventArgs e)
 {
 }
예제 #8
0
        //==========================================================//
        /// <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();
 }
예제 #11
0
        //==========================================================//
        /// <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,
                };
            }
        }
예제 #12
0
 /// <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);
     }
 }
예제 #13
0
 /** Manipulation Events ********/
 #region ManipulationEvents
 private void OnManipulationStarted(object sender, Manipulation2DStartedEventArgs e) {
     if (pickedObject != null)
         this.beginPos = pickedObject.Position; ;
 }