InteractionTracker.ConfigurePositionYInertiaModifiers Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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);
}