Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ScrollContentPresenter Class

Displays the content of a ScrollViewer control. This class cannot be inherited.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:

public sealed class ScrollContentPresenter : ContentPresenter, IScrollInfo
public final class ScrollContentPresenter extends ContentPresenter implements IScrollInfo
public final class ScrollContentPresenter extends ContentPresenter implements IScrollInfo
<ScrollContentPresenter .../>

The ScrollContentPresenter class provides support for styling the various components of a ScrollViewer control. For information about the scrolling region inside a ScrollViewer, see IScrollInfo.

The following example demonstrates how to use a ScrollContentPresenter to style the content of a ScrollViewer control.

<Style TargetType="{x:Type ScrollViewer}">
  <Setter Property="Template">
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
          <Border Grid.Row="0" Grid.Column="1">
            <ScrollContentPresenter Content="{TemplateBinding ScrollViewer.Content}" />
          <RepeatButton Grid.Column="0" Style="{DynamicResource ScrollBar_LineButton}" Command="ScrollBar.LineLeftCommand" Content="M 0 3.5 L 4 0 L 4 7 Z" />
          <RepeatButton Grid.Column="2" Style="{DynamicResource ScrollBar_LineButton}" Command="ScrollBar.LineRightCommand" Content="M 0 0 L 4 3.5 L 0 7 Z" />


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
© 2018 Microsoft