Class ScrollViewer
Implements scrollable area with content
Inherited Members
Namespace: EmptyKeys.UserInterface.Controls
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class ScrollViewer : ContentControl
Constructors
ScrollViewer()
Initializes a new instance of the ScrollViewer class.
Declaration
public ScrollViewer()
Fields
ActionProperty
The action property
Declaration
public static readonly DependencyProperty ActionProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
CanContentScrollProperty
The can content scroll property
Declaration
public static readonly DependencyProperty CanContentScrollProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ComputedHorizontalScrollBarVisibilityProperty
The computed horizontal scroll bar visibility property
Declaration
public static readonly DependencyProperty ComputedHorizontalScrollBarVisibilityProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ComputedVerticalScrollBarVisibilityProperty
The computed vertical scroll bar visibility property
Declaration
public static readonly DependencyProperty ComputedVerticalScrollBarVisibilityProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ExtentHeightProperty
The extent height property
Declaration
public static readonly DependencyProperty ExtentHeightProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ExtentWidthProperty
The extent width property
Declaration
public static readonly DependencyProperty ExtentWidthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HorizontalOffsetProperty
The horizontal offset property
Declaration
public static readonly DependencyProperty HorizontalOffsetProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HorizontalScrollBarVisibilityProperty
The horizontal scroll bar visibility property
Declaration
public static DependencyProperty HorizontalScrollBarVisibilityProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsMouseWheelEnabledProperty
The is mouse wheel enabled property
Declaration
public static readonly DependencyProperty IsMouseWheelEnabledProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PanningDecelerationProperty
The panning deceleration property
Declaration
public static readonly DependencyProperty PanningDecelerationProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PanningModeProperty
The panning mode property
Declaration
public static readonly DependencyProperty PanningModeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
PanningRatioProperty
The panning ratio property
Declaration
public static readonly DependencyProperty PanningRatioProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ScrollableHeightProperty
The scrollable height property
Declaration
public static readonly DependencyProperty ScrollableHeightProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ScrollableWidthProperty
The scrollable width property
Declaration
public static readonly DependencyProperty ScrollableWidthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ScrollChangedEvent
The scroll changed event
Declaration
public static readonly RoutedEvent ScrollChangedEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
ScrollPointProperty
The scroll point property
Declaration
public static readonly DependencyProperty ScrollPointProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
VerticalOffsetProperty
The vertical offset property
Declaration
public static readonly DependencyProperty VerticalOffsetProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
VerticalScrollBarVisibilityProperty
The vertical scroll bar visibility property
Declaration
public static readonly DependencyProperty VerticalScrollBarVisibilityProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ViewportHeightProperty
The viewport height property
Declaration
public static readonly DependencyProperty ViewportHeightProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ViewportWidthProperty
The viewport width property
Declaration
public static readonly DependencyProperty ViewportWidthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
ComputedHorizontalScrollBarVisibility
Gets the computed horizontal scroll bar visibility.
Declaration
public Visibility ComputedHorizontalScrollBarVisibility { get; }
Property Value
| Type | Description |
|---|---|
| Visibility | The computed horizontal scroll bar visibility. |
ComputedVerticalScrollBarVisibility
Gets the computed vertical scroll bar visibility.
Declaration
public Visibility ComputedVerticalScrollBarVisibility { get; }
Property Value
| Type | Description |
|---|---|
| Visibility | The computed vertical scroll bar visibility. |
ExtentHeight
Gets the height of the extent.
Declaration
public float ExtentHeight { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The height of the extent. |
ExtentWidth
Gets the width of the extent.
Declaration
public float ExtentWidth { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The width of the extent. |
HorizontalOffset
Gets the horizontal offset.
Declaration
public float HorizontalOffset { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The horizontal offset. |
HorizontalScrollBarVisibility
Gets or sets the horizontal scroll bar visibility.
Declaration
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
Property Value
| Type | Description |
|---|---|
| ScrollBarVisibility | The horizontal scroll bar visibility. |
PanningDeceleration
Gets or sets the panning deceleration.
Declaration
public float PanningDeceleration { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The panning deceleration. |
PanningMode
Gets or sets the panning mode.
Declaration
public PanningMode PanningMode { get; set; }
Property Value
| Type | Description |
|---|---|
| PanningMode | The panning mode. |
PanningRatio
Gets or sets the panning ratio.
Declaration
public float PanningRatio { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single | The panning ratio. |
ScrollableHeight
Gets the scrollable height.
Declaration
public float ScrollableHeight { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The height |
ScrollableWidth
Gets the scrollable width.
Declaration
public float ScrollableWidth { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The width |
VerticalOffset
Gets the vertical offset.
Declaration
public float VerticalOffset { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The vertical offset. |
VerticalScrollBarVisibility
Gets or sets the vertical scroll bar visibility.
Declaration
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Property Value
| Type | Description |
|---|---|
| ScrollBarVisibility | The vertical scroll bar visibility. |
ViewportHeight
Gets the height of the viewport.
Declaration
public float ViewportHeight { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The height of the viewport. |
ViewportWidth
Gets the width of the viewport.
Declaration
public float ViewportWidth { get; }
Property Value
| Type | Description |
|---|---|
| System.Single | The width of the viewport. |
Methods
ArrangeOverride(Size)
Arrange layout pass - overrider method for children
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
| Type | Name | Description |
|---|---|---|
| EmptyKeys.UserInterface.Size | finalSize | The final size. |
Returns
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Size |
Overrides
GetAction(DependencyObject)
Gets the action.
Declaration
public static ScrollViewerAction GetAction(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
Returns
| Type | Description |
|---|---|
| ScrollViewerAction |
GetCanContentScroll(DependencyObject)
Gets the can content scroll.
Declaration
public static bool GetCanContentScroll(DependencyObject dependencyObject)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | dependencyObject | The dependency object. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | dependencyObject |
GetHorizontalScrollBarVisibility(DependencyObject)
Gets the horizontal scroll bar visibility.
Declaration
public static ScrollBarVisibility GetHorizontalScrollBarVisibility(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
Returns
| Type | Description |
|---|---|
| ScrollBarVisibility |
GetIsMouseWheelEnabled(DependencyObject)
Gets the is mouse wheel enabled.
Declaration
public static bool GetIsMouseWheelEnabled(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
GetPanningDeceleration(DependencyObject)
Gets the panning deceleration.
Declaration
public static float GetPanningDeceleration(DependencyObject element)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | element | The element. |
Returns
| Type | Description |
|---|---|
| System.Single |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | element |
GetPanningMode(DependencyObject)
Gets the panning mode.
Declaration
public static PanningMode GetPanningMode(DependencyObject element)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | element | The element. |
Returns
| Type | Description |
|---|---|
| PanningMode |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | element |
GetPanningRatio(DependencyObject)
Gets the panning ratio.
Declaration
public static float GetPanningRatio(DependencyObject element)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | element | The element. |
Returns
| Type | Description |
|---|---|
| System.Single |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | element |
GetScrollPoint(DependencyObject)
Gets the scroll point.
Declaration
public static PointF GetScrollPoint(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
Returns
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.PointF |
GetVerticalScrollBarVisibility(DependencyObject)
Gets the vertical scroll bar visibility.
Declaration
public static ScrollBarVisibility GetVerticalScrollBarVisibility(DependencyObject obj)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
Returns
| Type | Description |
|---|---|
| ScrollBarVisibility |
InvalidateScrollInfo()
Invalidates the scroll information.
Declaration
public void InvalidateScrollInfo()
MeasureOverride(Size)
Measure layout pass
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
| Type | Name | Description |
|---|---|---|
| EmptyKeys.UserInterface.Size | availableSize | available size for element |
Returns
| Type | Description |
|---|---|
| EmptyKeys.UserInterface.Size |
Overrides
OnApplyTemplate()
Called when [apply template].
Declaration
public override void OnApplyTemplate()
Overrides
OnMouseDown(MouseButtonEventArgs)
Raises the MouseDown event.
Declaration
protected override void OnMouseDown(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
Overrides
OnMouseUp(Object, MouseButtonEventArgs)
Called when [mouse up].
Declaration
protected override void OnMouseUp(object sender, MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| MouseButtonEventArgs | e | The MouseButtonEventArgs instance containing the event data. |
Overrides
OnMouseWheel(MouseWheelEventArgs)
Called when [mouse wheel].
Declaration
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseWheelEventArgs | e | The MouseWheelEventArgs instance containing the event data. |
Overrides
OnPreviewGamepadMove(Object, GamepadMoveEventArgs)
Called when [preview game pad move].
Declaration
protected override void OnPreviewGamepadMove(object sender, GamepadMoveEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| GamepadMoveEventArgs | e | The GamepadMoveEventArgs instance containing the event data. |
Overrides
OnPreviewMouseMove(Object, MouseEventArgs)
Called when [preview mouse move].
Declaration
protected override void OnPreviewMouseMove(object sender, MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender. |
| MouseEventArgs | e | The MouseEventArgs instance containing the event data. |
Overrides
OnScrollChanged(ScrollChangedEventArgs)
Raises the ScrollChanged event.
Declaration
protected virtual void OnScrollChanged(ScrollChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollChangedEventArgs | e | The ScrollChangedEventArgs instance containing the event data. |
OnTouchGesture(TouchGestureEventArgs)
Raises the TouchGesture event.
Declaration
protected override void OnTouchGesture(TouchGestureEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TouchGestureEventArgs | e | The TouchGestureEventArgs instance containing the event data. |
Overrides
ScrollLineDown()
Scrolls the line down.
Declaration
public void ScrollLineDown()
ScrollLineLeft()
Scrolls the line left.
Declaration
public void ScrollLineLeft()
ScrollLineRight()
Scrolls the line right.
Declaration
public void ScrollLineRight()
ScrollLineUp()
Scrolls the line up.
Declaration
public void ScrollLineUp()
ScrollPageDown()
Scrolls the page down.
Declaration
public void ScrollPageDown()
ScrollPageLeft()
Scrolls the page left.
Declaration
public void ScrollPageLeft()
ScrollPageRight()
Scrolls the page right.
Declaration
public void ScrollPageRight()
ScrollPageUp()
Scrolls the page up.
Declaration
public void ScrollPageUp()
ScrollToBottom()
Scrolls to bottom.
Declaration
public void ScrollToBottom()
ScrollToEnd()
Scrolls to end.
Declaration
public void ScrollToEnd()
ScrollToHome()
Scrolls to home.
Declaration
public void ScrollToHome()
ScrollToHorizontalOffset(Single)
Scrolls to horizontal offset.
Declaration
public void ScrollToHorizontalOffset(float offset)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | offset | The offset. |
ScrollToLeftEnd()
Scrolls to left end.
Declaration
public void ScrollToLeftEnd()
ScrollToRightEnd()
Scrolls to right end.
Declaration
public void ScrollToRightEnd()
ScrollToTop()
Scrolls to top.
Declaration
public void ScrollToTop()
ScrollToVerticalOffset(Single)
Scrolls to vertical offset.
Declaration
public void ScrollToVerticalOffset(float offset)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | offset | The offset. |
SetAction(DependencyObject, ScrollViewerAction)
Sets the action.
Declaration
public static void SetAction(DependencyObject obj, ScrollViewerAction value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
| ScrollViewerAction | value | The value. |
SetCanContentScroll(DependencyObject, Boolean)
Sets the can content scroll.
Declaration
public static void SetCanContentScroll(DependencyObject dependencyObject, bool canContentScroll)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | dependencyObject | The dependency object. |
| System.Boolean | canContentScroll | if set to |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | dependencyObject |
SetHorizontalScrollBarVisibility(DependencyObject, ScrollBarVisibility)
Sets the horizontal scroll bar visibility.
Declaration
public static void SetHorizontalScrollBarVisibility(DependencyObject obj, ScrollBarVisibility value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
| ScrollBarVisibility | value | The value. |
SetIsMouseWheelEnabled(DependencyObject, Boolean)
Sets the is mouse wheel enabled.
Declaration
public static void SetIsMouseWheelEnabled(DependencyObject obj, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
| System.Boolean | value | if set to |
SetPanningDeceleration(DependencyObject, Single)
Sets the panning deceleration.
Declaration
public static void SetPanningDeceleration(DependencyObject element, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | element | The element. |
| System.Single | value | The value. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | element |
SetPanningMode(DependencyObject, PanningMode)
Sets the panning mode.
Declaration
public static void SetPanningMode(DependencyObject element, PanningMode panningMode)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | element | The element. |
| PanningMode | panningMode | The panning mode. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | element |
SetPanningRatio(DependencyObject, Single)
Sets the panning ratio.
Declaration
public static void SetPanningRatio(DependencyObject element, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | element | The element. |
| System.Single | value | The value. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | element |
SetScrollPoint(DependencyObject, PointF)
Sets the scroll point.
Declaration
public static void SetScrollPoint(DependencyObject obj, PointF value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
| EmptyKeys.UserInterface.PointF | value | The value. |
SetVerticalScrollBarVisibility(DependencyObject, ScrollBarVisibility)
Sets the vertical scroll bar visibility.
Declaration
public static void SetVerticalScrollBarVisibility(DependencyObject obj, ScrollBarVisibility value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | obj | The object. |
| ScrollBarVisibility | value | The value. |
Events
ScrollChanged
Occurs when [scroll changed].
Declaration
public event ScrollChangedEventHandler ScrollChanged
Event Type
| Type | Description |
|---|---|
| ScrollChangedEventHandler |