检测屏幕边缘

时间:2012-11-04 18:53:02

标签: c# .net windows-8 windows-store-apps

我使用以下代码使用c#

在Windows 8应用程序中拖动矩形
void Drag_ManipulationDelta(object sender,ManipulationDeltaRoutedEventArgs e)
{
   // Move the rectangle.   
   dragTranslation.X += e.Delta.Translation.X;
   dragTranslation.Y += e.Delta.Translation.Y; 
}

但是当我抛出矩形它从屏幕上消失时,我想在屏幕内保留矩形,如何检测屏幕的边缘?

0 个答案:

没有答案