0

I am using following code to drag a rectangular in windows 8 app using c#

void Drag_ManipulationDelta(object sender,ManipulationDeltaRoutedEventArgs e)
{
   // Move the rectangle.   
   dragTranslation.X += e.Delta.Translation.X;
   dragTranslation.Y += e.Delta.Translation.Y; 
}

But when I throw the rectangle it disappears from screen, I want to keep rectangle within the screen, how to detect the edges of screen?

4

0 に答える 0