Class ScrollContentPresenter
Displays the content of a ScrollViewer control.
Inheritance
Implements
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
public sealed class ScrollContentPresenter : ContentPresenter, IScrollInfo
Constructors
| Improve this Doc View SourceScrollContentPresenter()
Initializes a new instance of the ScrollContentPresenter class.
Declaration
public ScrollContentPresenter()
Properties
| Improve this Doc View SourceCanHorizontallyScroll
Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.
Declaration
public bool CanHorizontallyScroll { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if scrolling is possible; otherwise, false. |
CanVerticallyScroll
Gets or sets a value that indicates whether scrolling on the vertical axis is possible.
Declaration
public bool CanVerticallyScroll { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if scrolling is possible; otherwise, false. |
ExtentHeight
Gets the vertical size of the extent.
Declaration
public double ExtentHeight { get; }
Property Value
Type | Description |
---|---|
System.Double | The vertical size of the extent. |
ExtentWidth
Gets the horizontal size of the extent.
Declaration
public double ExtentWidth { get; }
Property Value
Type | Description |
---|---|
System.Double | The horizontal size of the extent. |
HorizontalOffset
Gets or sets the distance the content has been scrolled horizontally.
Declaration
public double HorizontalOffset { get; }
Property Value
Type | Description |
---|---|
System.Double | The distance the content has been scrolled horizontally. |
ScrollOwner
Gets or sets the ScrollViewer element that controls scrolling behavior.
Declaration
public ScrollViewer ScrollOwner { get; set; }
Property Value
Type | Description |
---|---|
ScrollViewer | The ScrollViewer element that controls scrolling behavior. |
VerticalOffset
Gets or sets the distance the content has been scrolled vertically.
Declaration
public double VerticalOffset { get; }
Property Value
Type | Description |
---|---|
System.Double | The distance the content has been scrolled vertically. |
ViewportHeight
Gets the vertical size of the viewport.
Declaration
public double ViewportHeight { get; }
Property Value
Type | Description |
---|---|
System.Double | The vertical size of the viewport. |
ViewportWidth
Gets the horizontal size of the viewport.
Declaration
public double ViewportWidth { get; }
Property Value
Type | Description |
---|---|
System.Double | The horizontal size of the viewport. |
Methods
| Improve this Doc View SourceArrangeOverride(Size)
Declaration
protected override Size ArrangeOverride(Size arrangeSize)
Parameters
Type | Name | Description |
---|---|---|
Size | arrangeSize |
Returns
Type | Description |
---|---|
Size |
Overrides
| Improve this Doc View SourceLineDown()
Scrolls the ScrollContentPresenter content downward by one line.
Declaration
public void LineDown()
LineLeft()
Scrolls the ScrollContentPresenter content to the left by a predetermined amount.
Declaration
public void LineLeft()
LineRight()
Scrolls the ScrollContentPresenter content to the right by a predetermined amount.
Declaration
public void LineRight()
LineUp()
Scrolls the ScrollContentPresenter content upward by one line.
Declaration
public void LineUp()
MakeVisible(UIElement, Rect)
Forces content to scroll until the coordinate space of a visual object is visible.
Declaration
[NotImplemented]
public Rect MakeVisible(UIElement visual, Rect rectangle)
Parameters
Type | Name | Description |
---|---|---|
UIElement | visual | A UIElement that becomes visible. |
Rect | rectangle | The bounding rectangle that identifies the coordinate space to make visible. |
Returns
Type | Description |
---|---|
Rect | A Rect that represents the visible region. |
MeasureOverride(Size)
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
Type | Name | Description |
---|---|---|
Size | constraint |
Returns
Type | Description |
---|---|
Size |
Overrides
| Improve this Doc View SourceMouseWheelDown()
Scrolls down within content after a user clicks the wheel button on a mouse.
Declaration
public void MouseWheelDown()
MouseWheelLeft()
Scrolls left within content after a user clicks the wheel button on a mouse.
Declaration
public void MouseWheelLeft()
MouseWheelRight()
Scrolls right within content after a user clicks the wheel button on a mouse.
Declaration
public void MouseWheelRight()
MouseWheelUp()
Scrolls up within content after a user clicks the wheel button on a mouse.
Declaration
public void MouseWheelUp()
OnApplyTemplate()
Builds the visual tree for the ScrollContentPresenter when a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourcePageDown()
Scrolls down within the content by one page.
Declaration
public void PageDown()
PageLeft()
Scrolls left within the content by one page.
Declaration
public void PageLeft()
PageRight()
Scrolls right within the content by one page.
Declaration
public void PageRight()
PageUp()
Scrolls up within the content by one page.
Declaration
public void PageUp()
SetHorizontalOffset(Double)
Sets the distance the content has been scrolled horizontally.
Declaration
public void SetHorizontalOffset(double offset)
Parameters
Type | Name | Description |
---|---|---|
System.Double | offset | The distance the content has been scrolled horizontally. |
SetVerticalOffset(Double)
Sets the distance the content has been scrolled vertically.
Declaration
public void SetVerticalOffset(double offset)
Parameters
Type | Name | Description |
---|---|---|
System.Double | offset | The distance the content has been scrolled vertically. |