مشاركة عبر


InteractionTracker.ConfigurePositionYInertiaModifiers Method

Definition

Applies a collection of InteractionTrackerInertiaModifier objects to the y inertia of an InteractionTracker.

The ConfigurePositionYInertiaModifiers method applies an individual or a collection of InteractionTrackerInertiaModifiers to the y component of InteractionTracker. The system will evaluate each of Y modifier’s condition property in the order they were added to InteractionTracker. Thus, the order that the InteractionTrackerInertiaModifier have in the collection will be the same order that the system will evaluate with.

public:
 virtual void ConfigurePositionYInertiaModifiers(IIterable<InteractionTrackerInertiaModifier ^> ^ modifiers) = ConfigurePositionYInertiaModifiers;
void ConfigurePositionYInertiaModifiers(IIterable<InteractionTrackerInertiaModifier> const& modifiers);
public void ConfigurePositionYInertiaModifiers(IEnumerable<InteractionTrackerInertiaModifier> modifiers);
function configurePositionYInertiaModifiers(modifiers)
Public Sub ConfigurePositionYInertiaModifiers (modifiers As IEnumerable(Of InteractionTrackerInertiaModifier))

Parameters

modifiers

IIterable<InteractionTrackerInertiaModifier>

IEnumerable<InteractionTrackerInertiaModifier>

The collection of InteractionTrackerInertiaModifier objects to apply to the y inertia of an InteractionTracker.

Examples

void SimpleYModifer(CompositionPropertySet shared)
{
  // Create the Inertia Modifier for Y Direction.
  var yModifier = InteractionTrackerInertiaRestingValue.Create(_compositor);

  // For sample purpose, always true condition
  yModifier.Condition = _compositor.CreateExpressionAnimation("5 > 3");
  yModifier.RestingValue = _compositor.CreateExpressionAnimation("this.Target.Position.Y - shared.snapRangeY");
  yModifier.RestingValue.SetReferenceParameter("shared", shared);
  var yModifierList = new InteractionTrackerInertiaRestingValue[] { yModifier };

  // Add modifier list to InteractionTracker.
  _tracker.ConfigurePositionYInertiaModifiers(yModifierList); 
}

Applies to