Share via


ScrollingScrollCompletedEventArgs.CorrelationId 屬性

定義

取得與位移變更相關聯的相互關聯標識符,先前由、 ScrollBy或 傳ScrollToAddScrollVelocity回。

public:
 property int CorrelationId { int get(); };
int CorrelationId();
public int CorrelationId { get; }
var int32 = scrollingScrollCompletedEventArgs.correlationId;
Public ReadOnly Property CorrelationId As Integer

屬性值

Int32

int

與位移相關聯的相互關聯標識符會變更。

備註

每個程式設計卷動或縮放變更都會與特定的相互關聯標識碼編號相關聯。 要求檢視變更ScrollTo時,會以 、ScrollByAddScrollVelocityZoomToZoomByAddZoomVelocity 作為傳回值來提供該數位。 在帶入檢視要求參與開始時引發的 BringingIntoView 事件中也會提供相互關聯標識碼。 這會標示相互關聯標識符存留期的開頭。

接著會在後續事件中公開相同的數位,例如 ScrollAnimationStartingScrollCompletedZoomAnimationStartingZoomCompleted。 這可讓您比對事件與其觸發方法呼叫或要求。

相互關聯標識符的存留期一律會在完成事件中結束: ScrollCompletedZoomCompleted

相互關聯標識碼的存留期可能會重疊。 例如,兩個回溯 ScrollTo 呼叫會產生兩個具有重迭存留期的相互關聯標識符。

當舊檢視仍在進行時要求新的檢視變更時,就會取消舊的檢視變更。 該取消會ScrollCompleted觸發具有舊 CorrelationId的或 ZoomCompleted 事件。

適用於