The following example shows an event handler for the ManipulationDelta event. The example checks whether the ManipulationDelta event occurred during inertia and whether the rectangle is touching the edge of a window. If those cases are true, the application stops the manipulation to prevent the rectangle from leaving the visible area of the application. This example is part of a larger example in Walkthrough: Creating Your First Touch Application.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)