IUIAnimationManager2::SetCompressPriorityComparison method (uianimation.h)

Sets the priority comparison handler that determines whether a scheduled storyboard can be compressed.

Syntax

HRESULT SetCompressPriorityComparison(
  [in, optional] IUIAnimationPriorityComparison2 *comparison
);

Parameters

[in, optional] comparison

The priority comparison handler for compression.

The specified object must implement the IUIAnimationPriorityComparison2 interface or be NULL. See Remarks for more info.

Return value

Returns S_OK if successful; otherwise an HRESULT error code. See Windows Animation Error Codes for a list of error codes.

Remarks

Setting a priority comparison handler with this method enables the application to indicate when scheduling conflicts can be resolved by compressing the scheduled storyboard and any other storyboards animating the same variables.

A storyboard can be compressed only if the priority comparison object registered with this method returns S_OK for all the other scheduled storyboards that will be affected by compression. When the storyboards are compressed, time is temporarily accelerated for affected storyboards, so they play faster.

Passing NULL for the comparison parameter causes Windows Animation to release its reference to any handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the IUIAnimationManager2::Shutdown method.

Requirements

Requirement Value
Minimum supported client Windows 8, Windows 7 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server None supported
Target Platform Windows
Header uianimation.h
DLL UIAnimation.dll

See also

IUIAnimationManager2

IUIAnimationManager2::SetCancelPriorityComparison

IUIAnimationManager2::SetConcludePriorityComparison

IUIAnimationManager2::SetTrimPriorityComparison

IUIAnimationPriorityComparison