VisualInteractionSource.PositionXChainingMode 属性

定义

PositionXChainingMode 属性定义 InteractionSource 在 X 方向上的链接行为。 有三种 InteractionChainingMode 类型:

  • Auto
  • 始终
  • Never

启用 X 方向链接时,每当交互 ((如平移) )会使 InteractionTracker 的位置超过其最小或最大 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);
}

适用于