共用方式為


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 邏輯會延遲,並在某些情況下將中繼事件合併成單一專案。

適用於

另請參閱