InteractionChainingMode
InteractionChainingMode
InteractionChainingMode
InteractionChainingMode
Enum
Definition
Defines the chaining behavior for a VisualInteractionSource. There are three options: Always chain, never chain or auto chain (let the system choose). If chaining is enabled, when an InteractionTracker reaches its minimum or maximum bounds, it will instead send the input to the next ancestor VisualInteractionSource.
public : enum class InteractionChainingModepublic enum InteractionChainingModePublic Enum InteractionChainingMode// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Fields
| Always Always Always Always | Always continue the manipulation. |
| Auto Auto Auto Auto | Automatically determine whether to continue the manipulation. |
| Never Never Never Never | Never continue the manipulation. |
Examples
void SetupInteractionSource(ContainerVisual container, InteractionTracker tracker)
{
// Setup the Interaction Source
_interactionSource = VisualInteractionSource.Create(container);
// Define Chaining modes for X, Y, and Scale.
_interactionSource.PositionXChainingMode = InteractionChainingMode.Never;
_interactionSource.PositionYChainingMode = InteractionChainingMode.Always;
_interactionSource.ScaleChainingMode = InteractionChainingMode.Auto;
// Attach the VisualInteractionSource to InteractionTracker
tracker.InteractionSources.Add(_interactionSource);
}
Remarks
When an InteractionTracker reaches either its minimum or maximum bounds, it will either overpan or chain the input up to its next ancestor VisualInteractionSource.
The picture below demonstrates a scenario where there may be a VisualInteractionSource (B) who is the child of another VisualInteractionSource (A). In this scenario, both elements are scrollable content – when the InteractionTracker in B reaches the boundary and chaining is enabled on B, the input will chain to A whose content will now begin to scroll.
Note
In these situations with chaining enabled, the input can chain from an InteractionTracker to an InteractionTracker, from an InteractionTracker to a XAML ScrollViewer, or from an InteractionTracker to a CoreWindow.
