Scroll​Content​Presenter Scroll​Content​Presenter Scroll​Content​Presenter Class

Definition

Displays the content of a ScrollViewer control.

public : sealed class ScrollContentPresenter : ContentPresenter, IScrollContentPresenterpublic sealed class ScrollContentPresenter : ContentPresenter, IScrollContentPresenterPublic NotInheritable Class ScrollContentPresenter Inherits ContentPresenter Implements IScrollContentPresenter
<ScrollContentPresenter .../>
-or-
<ScrollContentPresenter ...>
content
</ScrollContentPresenter>
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited properties

Inherited events

Inherited methods

Constructors

ScrollContentPresenter() ScrollContentPresenter() ScrollContentPresenter()

Initializes a new instance of the ScrollContentPresenter class.

public : ScrollContentPresenter()public ScrollContentPresenter()Public Sub New()
Attributes

Properties

CanHorizontallyScroll CanHorizontallyScroll CanHorizontallyScroll

Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.

public : PlatForm::Boolean CanHorizontallyScroll { get; set; }public bool CanHorizontallyScroll { get; set; }Public ReadWrite Property CanHorizontallyScroll As bool
Value
PlatForm::Boolean bool bool

true if scrolling is possible; otherwise, false.

Attributes

Remarks

Note

This property is not intended to be set in XAML. You can set the panel's Orientation property in XAML and optionally change the ScrollViewer.HorizontalScrollBarVisibility or ScrollViewer.VerticalScrollBarVisibility to change how scrolling works. This property can be changed in code. In some cases you will need to use VisualTreeHelper to access the panel. For example, when used in an ItemsPanel, there's no property that provides access to a ScrollContentPresenter within the panel.

CanVerticallyScroll CanVerticallyScroll CanVerticallyScroll

Gets or sets a value that indicates whether scrolling on the vertical axis is possible.

public : PlatForm::Boolean CanVerticallyScroll { get; set; }public bool CanVerticallyScroll { get; set; }Public ReadWrite Property CanVerticallyScroll As bool
Value
PlatForm::Boolean bool bool

true if scrolling is possible; otherwise, false.

Attributes

Remarks

Note

This property is not intended to be set in XAML. You can set the panel's Orientation property in XAML and optionally change the ScrollViewer.HorizontalScrollBarVisibility or ScrollViewer.VerticalScrollBarVisibility to change how scrolling works. This property can be changed in code. In some cases you will need to use VisualTreeHelper to access the panel. For example, when used in an ItemsPanel, there's no property that provides access to a ScrollContentPresenter within the panel.

ExtentHeight ExtentHeight ExtentHeight

Gets the vertical size of all the scrollable content.

public : double ExtentHeight { get; }public double ExtentHeight { get; }Public ReadOnly Property ExtentHeight As double
Value
double double double

The vertical size of the all scrollable content.

Attributes

Remarks

The extent includes all the content in the ScrollViewer, whether visible or not. The viewport is the visible area of the content.

See Also

ExtentWidth ExtentWidth ExtentWidth

Gets the horizontal size of all the scrollable content.

public : double ExtentWidth { get; }public double ExtentWidth { get; }Public ReadOnly Property ExtentWidth As double
Value
double double double

The horizontal size of all the scrollable content.

Attributes

Remarks

The extent includes all the content in the ScrollViewer, whether visible or not. The viewport is the visible area of the content.

See Also

HorizontalOffset HorizontalOffset HorizontalOffset

Gets the distance the content has been scrolled horizontally.

public : double HorizontalOffset { get; }public double HorizontalOffset { get; }Public ReadOnly Property HorizontalOffset As double
Value
double double double

The distance the content has been scrolled horizontally.

Attributes
See Also

ScrollOwner ScrollOwner ScrollOwner

Gets or sets the ScrollViewer element that controls scrolling behavior.

public : PlatForm::Object ScrollOwner { get; set; }public object ScrollOwner { get; set; }Public ReadWrite Property ScrollOwner As object
Value
PlatForm::Object object object

The ScrollViewer element that controls scrolling behavior.

Attributes

Remarks

This property is not intended to be set in XAML.

VerticalOffset VerticalOffset VerticalOffset

Gets the distance the content has been scrolled vertically.

public : double VerticalOffset { get; }public double VerticalOffset { get; }Public ReadOnly Property VerticalOffset As double
Value
double double double

The distance the content has been scrolled vertically.

Attributes
See Also

ViewportHeight ViewportHeight ViewportHeight

Gets the vertical size of the viewable content.

public : double ViewportHeight { get; }public double ViewportHeight { get; }Public ReadOnly Property ViewportHeight As double
Value
double double double

The vertical size of the viewable content.

Attributes

Remarks

The viewport includes all the visible content in the ScrollViewer.

See Also

ViewportWidth ViewportWidth ViewportWidth

Gets the horizontal size of the viewable content.

public : double ViewportWidth { get; }public double ViewportWidth { get; }Public ReadOnly Property ViewportWidth As double
Value
double double double

The horizontal size of the viewable content.

Attributes

Remarks

The viewport includes all the visible content in the ScrollViewer.

See Also

Methods

LineDown() LineDown() LineDown()

Scrolls the ScrollContentPresenter content downward by one line.

public : void LineDown()public void LineDown()Public Function LineDown() As void
Attributes

LineLeft() LineLeft() LineLeft()

Scrolls the ScrollContentPresenter content to the left by a predetermined amount.

public : void LineLeft()public void LineLeft()Public Function LineLeft() As void
Attributes

LineRight() LineRight() LineRight()

Scrolls the ScrollContentPresenter content to the right by a predetermined amount.

public : void LineRight()public void LineRight()Public Function LineRight() As void
Attributes

LineUp() LineUp() LineUp()

Scrolls the ScrollContentPresenter content upward by one line.

public : void LineUp()public void LineUp()Public Function LineUp() As void
Attributes

MakeVisible(UIElement, Rect) MakeVisible(UIElement, Rect) MakeVisible(UIElement, Rect)

Forces content to scroll until the coordinate space of a visual object is visible.

public : Rect MakeVisible(UIElement visual, Rect rectangle)public Rect MakeVisible(UIElement visual, Rect rectangle)Public Function MakeVisible(visual As UIElement, rectangle As Rect) As Rect
Parameters
visual
UIElement UIElement UIElement

A UIElement that becomes visible.

rectangle
Rect Rect Rect

The bounding rectangle that identifies the coordinate space to make visible.

Returns

A Rect that represents the visible region after scrolling happens.

Attributes

MouseWheelDown() MouseWheelDown() MouseWheelDown()

Scrolls down within content after a user clicks the wheel button on a mouse.

public : void MouseWheelDown()public void MouseWheelDown()Public Function MouseWheelDown() As void
Attributes

MouseWheelLeft() MouseWheelLeft() MouseWheelLeft()

Scrolls left within content after a user clicks the wheel button on a mouse.

public : void MouseWheelLeft()public void MouseWheelLeft()Public Function MouseWheelLeft() As void
Attributes

MouseWheelRight() MouseWheelRight() MouseWheelRight()

Scrolls right within content after a user clicks the wheel button on a mouse.

public : void MouseWheelRight()public void MouseWheelRight()Public Function MouseWheelRight() As void
Attributes

MouseWheelUp() MouseWheelUp() MouseWheelUp()

Scrolls up within content after a user clicks the wheel button on a mouse.

public : void MouseWheelUp()public void MouseWheelUp()Public Function MouseWheelUp() As void
Attributes

PageDown() PageDown() PageDown()

Scrolls down within the content by one page.

public : void PageDown()public void PageDown()Public Function PageDown() As void
Attributes

PageLeft() PageLeft() PageLeft()

Scrolls left within the content by one page.

public : void PageLeft()public void PageLeft()Public Function PageLeft() As void
Attributes

PageRight() PageRight() PageRight()

Scrolls right within the content by one page.

public : void PageRight()public void PageRight()Public Function PageRight() As void
Attributes

PageUp() PageUp() PageUp()

Scrolls up within the content by one page.

public : void PageUp()public void PageUp()Public Function PageUp() As void
Attributes

SetHorizontalOffset(Double) SetHorizontalOffset(Double) SetHorizontalOffset(Double)

Sets the distance the content has been scrolled horizontally.

public : void SetHorizontalOffset(double offset)public void SetHorizontalOffset(Double offset)Public Function SetHorizontalOffset(offset As Double) As void
Parameters
offset
double Double Double

The distance the content has been scrolled horizontally.

Attributes

SetVerticalOffset(Double) SetVerticalOffset(Double) SetVerticalOffset(Double)

Sets the distance the content has been scrolled vertically.

public : void SetVerticalOffset(double offset)public void SetVerticalOffset(Double offset)Public Function SetVerticalOffset(offset As Double) As void
Parameters
offset
double Double Double

The distance the content has been scrolled vertically.

Attributes

See Also