本文整理匯總了C#中System.Windows.UIElement.ManipulationInertiaStarting事件的典型用法代碼示例。如果您正苦於以下問題:C# UIElement.ManipulationInertiaStarting事件的具體用法?C# UIElement.ManipulationInertiaStarting怎麽用?C# UIElement.ManipulationInertiaStarting使用的例子?那麽, 這裏精選的事件代碼示例或許可以為您提供幫助。
在下文中一共展示了UIElement.ManipulationInertiaStarting事件的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Window_InertiaStarting
void Window_InertiaStarting(object sender, ManipulationInertiaStartingEventArgs e)
{
// Decrease the velocity of the Rectangle's movement by
// 10 inches per second every second.
// (10 inches * 96 pixels per inch / 1000ms^2)
e.TranslationBehavior.DesiredDeceleration = 10.0 * 96.0 / (1000.0 * 1000.0);
// Decrease the velocity of the Rectangle's resizing by
// 0.1 inches per second every second.
// (0.1 inches * 96 pixels per inch / (1000ms^2)
e.ExpansionBehavior.DesiredDeceleration = 0.1 * 96 / (1000.0 * 1000.0);
// Decrease the velocity of the Rectangle's rotation rate by
// 2 rotations per second every second.
// (2 * 360 degrees / (1000ms^2)
e.RotationBehavior.DesiredDeceleration = 720 / (1000.0 * 1000.0);
e.Handled = true;
}