Files
docs-desktop/dotnet-desktop-guide/framework/wpf/controls/how-to-handle-the-scrollchanged-event.md
T
Andy De George da363692ff Initial WPF content migrated (#17)
* Reset branch for WPF changes

* Convert BMP to PNG; fix link-out-of-scope err

* Add snippets for WPF... 6794 files!!!!

* Add missing snippets

* update file updated between migration

* Fix paths to include

* update breadcrumb and toc

* fix index links

* fix index links

* fix index links

* fix markdown
2020-09-04 09:46:28 -07:00

1.7 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Handle the ScrollChanged Event 03/30/2017
csharp
vb
ScrollViewer control [WPF], raising ScrollChanged events
ScrollChanged events [WPF]
42c695d8-ee28-49d4-80fd-fc71e9be7f29

How to: Handle the ScrollChanged Event

Example

This example shows how to handle the xref:System.Windows.Controls.ScrollViewer.ScrollChanged event of a xref:System.Windows.Controls.ScrollViewer.

A xref:System.Windows.Documents.FlowDocument element with xref:System.Windows.Documents.Paragraph parts is defined in [!INCLUDETLA2#tla_xaml]. When the xref:System.Windows.Controls.ScrollViewer.ScrollChanged event occurs due to user interaction, a handler is invoked, and text is written to a xref:System.Windows.Controls.TextBlock indicating that the event has occurred.

[!code-xamlscrollchangedeventargsLayout#1]
[!code-xamlscrollchangedeventargsLayout#2]

[!code-csharpscrollchangedeventargsLayout#3] [!code-vbscrollchangedeventargsLayout#3]

See also