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 逻辑会延迟中间事件并将其合并为单个事件。

适用于

另请参阅