Esempio n. 1
0
 private void Ellipse_MouseUp(object sender, MouseButtonEventArgs e)
 {
     System.Windows.Shapes.Ellipse item = sender as System.Windows.Shapes.Ellipse;
     if (!changemode && item.IsMouseCaptured)  //如果是上色模式就不執行
     {
         timershow.Stop();
         timersec.Stop();
         item.ReleaseMouseCapture();
         Canvas.SetZIndex(item, 0);  //物體位置回歸水平
         mouseX = -1;
         mouseY = -1;
         item.SetValue(Canvas.LeftProperty, oldpositionX); //轉完自動歸位圓圈
         item.SetValue(Canvas.TopProperty, oldpositionY);  //
     }
 }