IUIAnimationManager2::SetCancelPriorityComparison method (uianimation.h)
Sets the priority comparison handler that determines whether a scheduled storyboard can be canceled.
HRESULT SetCancelPriorityComparison( IUIAnimationPriorityComparison2 *comparison );
The priority comparison handler for cancelation.
The specified object must implement the IUIAnimationPriorityComparison2 interface or be NULL. See Remarks for more info.
Returns S_OK if successful; otherwise an HRESULT error code. See Windows Animation Error Codes for a list of error codes.
Setting a priority comparison handler with this method enables the application to indicate when scheduling conflicts can be resolved by canceling storyboards.
A scheduled storyboard can be canceled only if it hasn't started playing and the priority comparison object registered with this method returns S_OK. Canceled storyboards are completely removed from the schedule.
Passing NULL for the comparison parameter causes Windows Animation to release its reference to any priority comparison handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the IUIAnimationManager2::Shutdown method.
|Minimum supported client||Windows 8, Windows 7 and Platform Update for Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||None supported|