-api-id | -api-type |
---|---|
P:Windows.UI.Composition.Interactions.VisualInteractionSource.PositionYChainingMode |
winrt property |
The PositionYChainingMode property defines the chaining behavior for an InteractionSource in the Y direction. There are three types of InteractionChainingMode s: Auto , Always , Never . When chaining in the Y direction is enabled, input will flow to the nearest ancestor’s VisualInteractionSource whenever the interaction (such as panning) would otherwise take InteractionTracker ’s position past its minimum or maximum Y position.
Chaining mode for the Y-axis.
void SetupInteractionSource(ContainerVisual container, InteractionTracker tracker)
{
// Setup the Interaction Source
_interactionSource = VisualInteractionSource.Create(container);
// Enable chaining for the Y direction.
_interactionSource.PositionYChainingMode = InteractionChainingMode.Always;
// Attach the VisualInteractionSource to InteractionTracker
tracker.InteractionSources.Add(_interactionSource);
}