共用方式為


ScrollViewer.ViewChanging 事件

定義

發生于捲動和縮放之類的操作會導致檢視變更時。

// Register
event_token ViewChanging(EventHandler<ScrollViewerViewChangingEventArgs> const& handler) const;

// Revoke with event_token
void ViewChanging(event_token const* cookie) const;

// Revoke with event_revoker
ScrollViewer::ViewChanging_revoker ViewChanging(auto_revoke_t, EventHandler<ScrollViewerViewChangingEventArgs> const& handler) const;
public event System.EventHandler<ScrollViewerViewChangingEventArgs> ViewChanging;
function onViewChanging(eventArgs) { /* Your code */ }
scrollViewer.addEventListener("viewchanging", onViewChanging);
scrollViewer.removeEventListener("viewchanging", onViewChanging);
- or -
scrollViewer.onviewchanging = onViewChanging;
Public Custom Event ViewChanging As EventHandler(Of ScrollViewerViewChangingEventArgs) 
<ScrollViewer ViewChanging="eventhandler"/>

事件類型

備註

ScrollViewerViewChangingEventArgs 包含 IsInertial 屬性,其會報告引發事件的操作是否包含慣性元件。

並非所有基礎操作都一定會引發此事件。 ScrollViewer邏輯會延遲,並在某些情況下將中繼事件彙總成單一事件。

適用於

另請參閱