Dela via


ScrollViewer.ViewChanging Event

Definition

Occurs when manipulations such as scrolling and zooming cause the view to change.

// 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"/>

Event Type

Remarks

ScrollViewerViewChangingEventArgs includes the IsInertial property, which reports whether the manipulation that is firing the event contains an inertial component.

Not every underlying manipulation will necessarily fire this event. The ScrollViewer logic delays and consolidates intermediate events into a single occurrence in some cases.

Applies to

See also