Class ScrollViewerExtensions
Provides useful extensions to ScrollViewer instances.
Inheritance
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
public static class ScrollViewerExtensions
Fields
| Improve this Doc View SourceIsMouseWheelScrollingEnabledProperty
Identifies the IsMouseWheelScrollingEnabled dependency property.
Declaration
public static readonly DependencyProperty IsMouseWheelScrollingEnabledProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Methods
| Improve this Doc View SourceGetIsMouseWheelScrollingEnabled(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. |
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 |
|
System.ArgumentNullException |
|
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 |
|
System.ArgumentNullException |
|
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 |
|
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 |
|
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. |