Download presentation
Presentation is loading. Please wait.
Published byBonnie Lewis Modified over 9 years ago
3
manipulation events. ManipulationStarting and ManipulationStarted. ManipulationDelta. ManipulationCompleted combine info from multiple events IsManipulationEnabled=true on this or a parent and basic events not handled manipulation starting and started at first finger touchdown, delta at touchmove, and completed after touchup for all fingers starting and started allow to customize or cancel or disallow some manipulations ManipulationDelta class has Translation, Scale, Rotation, Expansion (like Scale but dev ind px instead of scale factor) ManipulationDeltaEventArgs has DeltaManipulation and CumulativeManipulation e.g. move rotate zoom a photo
6
manipulations always done relative to a manipulation container... by def. element with ismanipulationenabled=true or handle ManipulationStarting event and set ManipulationStartingEventArgs. ManipulationContainer Inertia ? ManipulationInertiaStarting event when all fingers loose contact even before completed event by default manipulationcompleted thrown right away but you can set ManipulationInertiaStartingEventArgs. TranslationBehavior,.RotationBehavior, and/or.ExpansionBehavior then deltas thrown and then completed until inertia
7
. TranslationBehavior—DesiredDisplacement, DesiredDeceleration, and InitialVelocity. RotationBehavior—DesiredRotation, DesiredDeceleration, and InitialVelocity. ExpansionBehavior—DesiredExpansion, DesiredDeceleration, InitialRadius, and InitialVelocity Typically only set DesiredDeceleration or the behavior-specific DesiredDisplacement, DesiredRotation, or DesiredExpansion The latter properties are useful for ensuring that the element doesn’t go too far. By default, InitialVelocity and InitialRadius are initialized with the current values. You can get the various velocities by checking ManipulationInertiaStartingEventArgs.InitialVelocities, which has LinearVelocity, AngularVelocity, and ExpansionVelocity
9
be boundary aware ManipulationBoundaryFeedback event Inside a ManipulationDelta event handler, you can call the ReportBoundaryFeedback method on the passed-in ManipulationDeltaEventArgs instance to make the window bounce... similar to iphone bounce list behavior e.g. spin prize wheel
12
You can take advantage of panning support built into ScrollViewer by setting its PanningMode property to HorizontalOnly, VerticalOnly, HorizontalFirst, VerticalFirst, or Both You can download the Surface Toolkit for Windows Touch to get numerous slick Microsoft Surface WPF controls that are optimized for multi-touch. This includes “surface versions” of most common controls (such as SurfaceButton and SurfaceCheckBox) and brand-new controls (such as ScatterView and LibraryStack).
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.