Snap Type Points
Snap Type Points
Defines constants that specify how panning snap points are processed for gesture/manipulation input.
public : enum class SnapPointsType
public enum SnapPointsType
Public Enum SnapPointsType
Windows 10 (introduced v10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced v1)
|Mandatory Mandatory Mandatory||
Content always stops at the snap point closest to where inertia would naturally stop along the direction of inertia.
|MandatorySingle MandatorySingle MandatorySingle||
Content always stops at the snap point closest to the release point along the direction of inertia.
|None None None||
No snapping behavior. Only the manipulation influences the final location.
|Optional Optional Optional||
Content stops at a snap point closest to where inertia would naturally stop along the direction of inertia, depending on how close the snap point is.
|OptionalSingle OptionalSingle OptionalSingle||
Content stops at the next snap point, if the motion starts far from it.
For panning actions, there are often natural stopping places. Snap points provide a way to indicate where these places are. Then, when a user swipes, the manipulation result favors that natural point using behavior as expressed by a SnapPointsType value. The proximity determination is made by the Direct Manipulation subsystem that supports the manipulation handling for a XAML ScrollViewer. The Single variations factor in both the inertia and the release point.
Proximity points (Optional** and *OptionalSingle*): ** When a user is going to naturally stop the manipulation in the proximity of a snap point, proximity points help the user land at the natural stopping place. Because the user has to land in proximity to the snap point to cause it to stop there, the user will sometimes have to perform another swipe to reach a snap point.
Mandatory snap points (Mandatory** and *MandatorySingle*): ** In contrast to proximity, mandatory snap points ensure that the content is adjusted to always land on a snap point. Even if the user releases the manipulation halfway between two snap-points, it will always move to one of the snap points.
To see the effects of snap points on ScrollViewer behavior yourself, get the XAML scrolling, panning and zooming sample. Run the sample on a touch device (not the simulator). Try out the SnapPointsType values when you view the "Panning with snap-points" example page of the sample.