Dela via


ScrollViewer.ViewChanged Event

Definition

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

// Register
event_token ViewChanged(EventHandler<ScrollViewerViewChangedEventArgs> const& handler) const;

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

// Revoke with event_revoker
ScrollViewer::ViewChanged_revoker ViewChanged(auto_revoke_t, EventHandler<ScrollViewerViewChangedEventArgs> const& handler) const;
public event System.EventHandler<ScrollViewerViewChangedEventArgs> ViewChanged;
function onViewChanged(eventArgs) { /* Your code */ }
scrollViewer.addEventListener("viewchanged", onViewChanged);
scrollViewer.removeEventListener("viewchanged", onViewChanged);
- or -
scrollViewer.onviewchanged = onViewChanged;
Public Custom Event ViewChanged As EventHandler(Of ScrollViewerViewChangedEventArgs) 
<ScrollViewer ViewChanged="eventhandler"/>

Event Type

Remarks

ViewChanging fires before ViewChanged.

In your event handler, use a parameter of type ScrollViewerViewChangedEventArgs for the second parameter of your handler method. ScrollViewerViewChangedEventArgs includes the IsIntermediate property, which reports whether the manipulation that fired the event is completed or still ongoing.

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

Applies to

See also