September 2012
Intermediate to advanced
464 pages
10h 55m
English
There are occasions when some data to display is larger than the display area; this requires scrolling capabilities. WPF provides that using a simple control, the ScrollViewer.
Make sure Visual Studio is up and running.
We'll create a simple image viewer that provides scrollbars if necessary when viewing a large image:
CH03.ScrollDemo.Penguins.jpg file from the Pictures | Sample Pictures folder.MainWindow.xaml. Add a ScrollViewer control inside the existing Grid.ScrollViewer, add an Image element, and set its Source property to the image you added:<ScrollViewer> <Image Source="penguins.jpg" ...