作者:.NET开发
项目:System.Windows.Inpu
void Window_ManipulationStarting(object sender, ManipulationStartingEventArgs e)
{
// Set the ManipulationPivot so that the element rotates as it is
// moved with one finger.
FrameworkElement element = e.OriginalSource as FrameworkElement;
ManipulationPivot pivot = new ManipulationPivot();
pivot.Center = new Point(element.ActualWidth / 2, element.ActualHeight / 2);
pivot.Radius = 20;
e.Pivot = pivot;
e.ManipulationContainer = this;
e.Handled = true;
}