Esempio n. 1
0
        void OnOwnerManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            e.Handled = true;
            ISimpleManupulationSupport sms = this.owner as ISimpleManupulationSupport;

            if (sms != null)
            {
                sms.FinishManipulation(false);
            }
            if (e.TotalManipulation.Translation.X == 0.0 && e.TotalManipulation.Translation.Y == 0.0 && e.TotalManipulation.Scale.X == 1.0 && e.TotalManipulation.Scale.Y == 1.0)
            {
                RaiseClick();
            }
        }
Esempio n. 2
0
        void OnOwnerMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (!this.manipulationInProgress)
            {
                return;
            }
            e.Handled = true;
            this.manipulationInProgress = false;
            this.owner.ReleaseMouseCapture();
            ISimpleManupulationSupport sms = this.owner as ISimpleManupulationSupport;

            if (sms != null)
            {
                sms.FinishManipulation(true);
            }
            if (!mouseMoveHandled)
            {
                doNotProcessMouse = true;
                RaiseClick();
                doNotProcessMouse = false;
            }
        }