Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 2.06 KB

interactiontracker_configurescaleinertiamodifiers_1005945979.md

File metadata and controls

46 lines (31 loc) · 2.06 KB
-api-id -api-type
M:Microsoft.UI.Composition.Interactions.InteractionTracker.ConfigureScaleInertiaModifiers(Windows.Foundation.Collections.IIterable{Microsoft.UI.Composition.Interactions.InteractionTrackerInertiaModifier})
winrt method

Microsoft.UI.Composition.Interactions.InteractionTracker.ConfigureScaleInertiaModifiers

-description

Applies a collection of InteractionTrackerInertiaModifier objects to the scale of an InteractionTracker.

The ConfigureScaleInertiaModifiers method applies an individual or a collection of InteractionTrackerInertiaModifiers to the scale component of InteractionTracker. The system will evaluate each of Scale 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.

-parameters

-param modifiers

The collection of InteractionTrackerInertiaModifier objects to apply to the scale of an InteractionTracker.

-remarks

-examples

void SimpleScaleModifer(CompositionPropertySet shared)
{
  // Create the Inertia Modifier for Scale.
  var scaleModifier = InteractionTrackerInertiaRestingValue.Create(_compositor);

  // For sample purpose, always true condition
  scaleModifier.Condition = _compositor.CreateExpressionAnimation("5 > 3");
  
  scaleModifier.RestingValue = _compositor.CreateExpressionAnimation("this.Target.Scale - shared.scaleRange");
  scaleModifier.RestingValue.SetReferenceParameter("shared", shared);
  var scaleModifierList = new InteractionTrackerInertiaRestingValue[] { scaleModifier };
  
  // Add modifier list to InteractionTracker.
  _tracker.ConfigureScaleInertiaModifiers(scaleModifierList); 
}
         

-see-also