Delen via


VisualInteractionSource.PositionXChainingMode Property

Definition

The PositionXChainingMode property defines the chaining behavior for an InteractionSource in the X direction. There are three types of InteractionChainingMode s: Auto , Always , Never . When chaining in the X 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 X position.

public:
 property InteractionChainingMode PositionXChainingMode { InteractionChainingMode get(); void set(InteractionChainingMode value); };
InteractionChainingMode PositionXChainingMode();

void PositionXChainingMode(InteractionChainingMode value);
public InteractionChainingMode PositionXChainingMode { get; set; }
var interactionChainingMode = visualInteractionSource.positionXChainingMode;
visualInteractionSource.positionXChainingMode = interactionChainingMode;
Public Property PositionXChainingMode As InteractionChainingMode

Property Value

Chaining mode for the X-axis.

Examples

void SetupInteractionSource(ContainerVisual container, InteractionTracker tracker)
{
  // Setup the Interaction Source
  _interactionSource = VisualInteractionSource.Create(container);
  // Disable chaining on the X component.
  _interactionSource.PositionXChainingMode = InteractionChainingMode.Never; 
  // Attach the VisualInteractionSource to InteractionTracker
  tracker.InteractionSources.Add(_interactionSource);
}

Applies to