VisualInteractionSource.PositionXChainingMode 属性

定义

PositionXChainingMode 属性定义 X 方向的 InteractionSource 的链行为。 有三种类型的 InteractionChainingMode s: AutoAlwaysNever 。 启用 X 方向链接时,每当交互 ((例如平移) )将交互跟踪器的位置超过其最小或最大 X 位置时,输入将流向最近的上级 VisualInteractionSource

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

属性值

X 轴的链接模式。

示例

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);
}

适用于