ScrollingScrollCompletedEventArgs.CorrelationId Property
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.
Gets the correlation ID associated with the offsets change, previously returned by ScrollTo
, ScrollBy
, or AddScrollVelocity
.
public:
property int CorrelationId { int get(); };
int CorrelationId();
public int CorrelationId { get; }
var int32 = scrollingScrollCompletedEventArgs.correlationId;
Public ReadOnly Property CorrelationId As Integer
Property Value
int
The correlation ID associated with the offsets 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 ScrollTo
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
.