VisualInteractionSource.PositionYChainingMode 属性

定义

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

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

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

属性值

Y 轴的链接模式。

示例

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

适用于