Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 1.83 KB

scrollingzoomcompletedeventargs_correlationid.md

File metadata and controls

34 lines (20 loc) · 1.83 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Controls.ScrollingZoomCompletedEventArgs.CorrelationId
winrt property

Microsoft.UI.Xaml.Controls.ScrollingZoomCompletedEventArgs.CorrelationId

-description

Gets the correlation ID associated with the zoom factor change, previously returned by ZoomTo, ZoomBy, or AddZoomVelocity.

-property-value

The correlation ID associated with the zoom factor change.

-remarks

Each programmatic scroll or zoom change is associated with a particular correlation ID number. That number is provided when requesting a view change with ScrollTo, ScrollBy, AddScrollVelocity, ZoomTo, ZoomBy or AddZoomVelocity as a return value. A correlation ID is also provided in the BringingIntoView event raised at the beginning of a bring-into-view request participation. This marks the beginning of a correlation ID's lifetime.

That same number is then exposed in subsequent events like ScrollAnimationStarting and ScrollCompleted, or ZoomAnimationStarting and ZoomCompleted. This lets you match events with their triggering method call or request.

The lifetime of a correlation ID always ends in a completion event: ScrollCompleted or ZoomCompleted.

The lifetimes of correlation IDs can overlap. For example, two back-to-back ZoomTo calls will generate two correlation IDs with overlapping lifetimes.

When a new view change is requested while an old one is still in progress, the old one is cancelled. That cancellation triggers a ScrollCompleted or ZoomCompleted event with the old CorrelationId.

-see-also

-examples