Show / Hide Table of Contents

Class ScrollViewerExtensions

Provides useful extensions to ScrollViewer instances.

Inheritance
System.Object
ScrollViewerExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Toolkit.dll
Syntax
public static class ScrollViewerExtensions

Fields

| Improve this Doc View Source

IsMouseWheelScrollingEnabledProperty

Identifies the IsMouseWheelScrollingEnabled dependency property.

Declaration
public static readonly DependencyProperty IsMouseWheelScrollingEnabledProperty
Field Value
Type Description
DependencyProperty

Methods

| Improve this Doc View Source

GetIsMouseWheelScrollingEnabled(ScrollViewer)

Gets a value indicating whether the ScrollViewer has enabled scrolling via the mouse wheel.

Declaration
public static bool GetIsMouseWheelScrollingEnabled(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Returns
Type Description
System.Boolean

A value indicating whether the ScrollViewer has enabled scrolling via the mouse wheel.

| Improve this Doc View Source

LineDown(ScrollViewer)

Scroll the ScrollViewer down by a line.

Declaration
public static void LineDown(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

LineLeft(ScrollViewer)

Scroll the ScrollViewer left by a line.

Declaration
public static void LineLeft(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

LineRight(ScrollViewer)

Scroll the ScrollViewer right by a line.

Declaration
public static void LineRight(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

LineUp(ScrollViewer)

Scroll the ScrollViewer up by a line.

Declaration
public static void LineUp(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

PageDown(ScrollViewer)

Scroll the ScrollViewer down by a page.

Declaration
public static void PageDown(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

PageLeft(ScrollViewer)

Scroll the ScrollViewer left by a page.

Declaration
public static void PageLeft(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

PageRight(ScrollViewer)

Scroll the ScrollViewer right by a page.

Declaration
public static void PageRight(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

PageUp(ScrollViewer)

Scroll the ScrollViewer up by a page.

Declaration
public static void PageUp(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

ScrollIntoView(ScrollViewer, FrameworkElement)

Scroll the desired element into the ScrollViewer's viewport.

Declaration
public static void ScrollIntoView(this ScrollViewer viewer, FrameworkElement element)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

FrameworkElement element

The element to scroll into view.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

ScrollIntoView(ScrollViewer, FrameworkElement, Double, Double, Duration)

Scroll the desired element into the ScrollViewer's viewport.

Declaration
public static void ScrollIntoView(this ScrollViewer viewer, FrameworkElement element, double horizontalMargin, double verticalMargin, Duration duration)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

FrameworkElement element

The element to scroll into view.

System.Double horizontalMargin

The margin to add on the left or right.

System.Double verticalMargin

The margin to add on the top or bottom.

Duration duration

The duration of the animation.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

System.ArgumentNullException

element is null.

| Improve this Doc View Source

ScrollToBottom(ScrollViewer)

Scroll the ScrollViewer to the bottom.

Declaration
public static void ScrollToBottom(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

ScrollToLeft(ScrollViewer)

Scroll the ScrollViewer to the left.

Declaration
public static void ScrollToLeft(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

ScrollToRight(ScrollViewer)

Scroll the ScrollViewer to the right.

Declaration
public static void ScrollToRight(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

ScrollToTop(ScrollViewer)

Scroll the ScrollViewer to the top.

Declaration
public static void ScrollToTop(this ScrollViewer viewer)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

Exceptions
Type Condition
System.ArgumentNullException

viewer is null.

| Improve this Doc View Source

SetIsMouseWheelScrollingEnabled(ScrollViewer, Boolean)

Sets a value indicating whether the ScrollViewer will enable scrolling via the mouse wheel.

Declaration
public static void SetIsMouseWheelScrollingEnabled(this ScrollViewer viewer, bool value)
Parameters
Type Name Description
ScrollViewer viewer

The ScrollViewer.

System.Boolean value

A value indicating whether the ScrollViewer will enable scrolling via the mouse wheel.

  • Improve this Doc
  • View Source