O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scrolling

For most apps, the ability to scroll through content that is too large to view all at once is critical. XAML-based UI frameworks make this easy because all you need to do is wrap an element in a ScrollViewer control, and the element instantly becomes scrollable. ScrollViewer makes use of ScrollBar controls and hooks them up to your content automatically.

ScrollViewer has a Content property that can be set to a single item, typically an entire panel. Because Content is ScrollViewer’s content property in the XAML sense, you can place the item requiring scrolling as its child element. Here’s an example:

<Page ...>  <ScrollViewer>     <StackPanel>      ...    </StackPanel>  </ScrollViewer> </Page>

Figure 6.15 shows the Page containing the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required