private void MainPage_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if (_curRectangle != null)
     {
         _curRectangle.ClearStartTemp();
         _curRectangle = null;
     }
 }
 private void MainPage_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     _curRectangle = new RealRect((int)e.GetPosition(sender as Canvas).X, (int)e.GetPosition(sender as Canvas).Y, false);
     mainCanvas.Children.Insert(0, _curRectangle.Rect);
     _curRectangle.StartRect();
 }