InteractionTracker.ConfigureScaleInertiaModifiers 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 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.
public:
virtual void ConfigureScaleInertiaModifiers(IIterable<InteractionTrackerInertiaModifier ^> ^ modifiers) = ConfigureScaleInertiaModifiers;
void ConfigureScaleInertiaModifiers(IIterable<InteractionTrackerInertiaModifier> const& modifiers);
public void ConfigureScaleInertiaModifiers(IEnumerable<InteractionTrackerInertiaModifier> modifiers);
function configureScaleInertiaModifiers(modifiers)
Public Sub ConfigureScaleInertiaModifiers (modifiers As IEnumerable(Of InteractionTrackerInertiaModifier))
Parameters
- modifiers
The collection of InteractionTrackerInertiaModifier objects to apply to the scale of an InteractionTracker.
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);
}