事件MouseLeave在Windows手机上

时间:2013-10-25 11:28:00

标签: c# windows-phone mouseevent

我有一个要管理的MouseLeave事件。它适用于模拟器,但不适用于Windows Phone设备,代码如下:

 private void sun_MouseLeave(object sender, MouseEventArgs e)
        {
            Point punto = e.GetPosition(sun);
            Point punto1 = new Point(-361, 448);
            double X1 = Math.Abs(punto.X - punto1.X);
            if (X1 < 100)
            {
                tmr.Start();
            }                  
        }

它应该在计时器打开时激活另一个事件。但它不起作用! 这是另一个事件:

void OnTimerTick(object sender, EventArgs e)
      {
        tmr.Stop();
        double lol = cube.Margin.Left;
        double lol2 = cube.Margin.Top;
        cube.Height -= 50;
        cube.Width -= 50;
        cube.Margin = new Thickness(lol + 20, lol - 50, 0, 0);

        pozza.Height += 50;
        pozza.Height += 50;

        if(cube.Height <= 0 )
             NavigationService.Navigate(new Uri("/lvlSet2/s2lvl21.xaml", UriKind.Relative));
        else
            tmr.Start();
    }

0 个答案:

没有答案