Class ScrollControl
ScrollControl maintains a collection of child frames at the top, bottom, left and right of the control so that they do not scroll similiar to Internet Explorer frames concept. It maintains clipping for child elements inside these frames. The height and width of the frames is specified through the TopLeftFrameExtent and BottomRightFrameExtent methods. The inner frame is scrollable both horizontally and vertically.
ScrollControl implements IScrollInfo and provides VScrollBar and HScrollBar properties to simplify management of scrollbars.
Adding and removing Visual elements from the Children collection does not trigger calls to InvalidateMeasure. This allows adding and removing elements on the fly. A derived control is responsible to call Measure and Arrange on child elements since this base class will not do this by itsself.
ScrollControl also has support for automatic scrolling of content when the user drags the pressed mouse to an edge of the control.
ScrollControl is best embedded inside a ScrollViewer container, but can also be placed standalone on a form.
Inherited Members
Namespace: Syncfusion.Windows.Controls.Scroll
Assembly: Syncfusion.GridCommon.WPF.dll
Syntax
public class ScrollControl : VisualContainer, IScrollBarProvider, IScrollInfo, IDisposable
Constructors
ScrollControl()
Initializes a new instance of the ScrollControl class.
Declaration
public ScrollControl()
Fields
ScrollControlMouseDownEvent
Declaration of the routed event reporting the mouse button was pressed
Declaration
public static readonly RoutedEvent ScrollControlMouseDownEvent
Field Value
| Type |
|---|
| System.Windows.RoutedEvent |
ScrollControlMouseMoveEvent
Declaration of the routed event reporting the mouse was pressed
Declaration
public static readonly RoutedEvent ScrollControlMouseMoveEvent
Field Value
| Type |
|---|
| System.Windows.RoutedEvent |
ScrollControlMouseUpEvent
Declaration of the routed event reporting the mouse button was pressed
Declaration
public static readonly RoutedEvent ScrollControlMouseUpEvent
Field Value
| Type |
|---|
| System.Windows.RoutedEvent |
ScrollControlPreviewMouseDownEvent
Declaration of the routed event reporting the mouse button was pressed
Declaration
public static readonly RoutedEvent ScrollControlPreviewMouseDownEvent
Field Value
| Type |
|---|
| System.Windows.RoutedEvent |
ScrollControlPreviewMouseMoveEvent
Declaration of the routed event reporting the mouse was pressed
Declaration
public static readonly RoutedEvent ScrollControlPreviewMouseMoveEvent
Field Value
| Type |
|---|
| System.Windows.RoutedEvent |
ScrollControlPreviewMouseUpEvent
Declaration of the routed event reporting the mouse button was pressed
Declaration
public static readonly RoutedEvent ScrollControlPreviewMouseUpEvent
Field Value
| Type |
|---|
| System.Windows.RoutedEvent |
ZoomScaleProperty
Declaration
public static readonly DependencyProperty ZoomScaleProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Properties
AutoScroller
Gets the auto scroller which provides automatic scrolling of content when the user drags the pressed mouse to an edge of the control.
Declaration
public AutoScroller AutoScroller { get; }
Property Value
| Type | Description |
|---|---|
| AutoScroller | The auto scroller. |
BackgroundFrame
Gets the background frame which is placed behind the inner frame. Use this frame to draw behind the default content. VirtualizingCellsControl uses it to draw the background of cells in this frame. The frame spans the whole visible area of the control.
Declaration
public VisualContainer BackgroundFrame { get; }
Property Value
| Type | Description |
|---|---|
| VisualContainer | The background frame. |
BottomRightFrameExtent
Gets or sets the bottom and right frame extent specifiying the height of the bottom frame and the width of the right frame.
Declaration
protected Size BottomRightFrameExtent { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Windows.Size | The bottom and right frame extent. |
CanHorizontallyScroll
Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.
Declaration
public virtual bool CanHorizontallyScroll { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
CanVerticallyScroll
Gets or sets a value that indicates whether scrolling on the vertical axis is possible.
Declaration
public virtual bool CanVerticallyScroll { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ElementsFrame
Declaration
public VisualContainer ElementsFrame { get; }
Property Value
| Type |
|---|
| VisualContainer |
ExtentHeight
Gets the vertical size of the extent.
Declaration
public virtual double ExtentHeight { get; }
Property Value
| Type |
|---|
| System.Double |
ExtentWidth
Gets the horizontal size of the extent.
Declaration
public virtual double ExtentWidth { get; }
Property Value
| Type |
|---|
| System.Double |
ForegroundFrame
Gets the foreground frame which is placed in front of the inner frame. Use this frame to draw objects in front of the default content. The GridControl uses it to draw cell selection and current cell border in front of cells using a semi-transparent color.
Declaration
public VisualContainer ForegroundFrame { get; }
Property Value
| Type | Description |
|---|---|
| VisualContainer | The background frame. |
GraphicFrame
Declaration
public VisualContainer GraphicFrame { get; }
Property Value
| Type |
|---|
| VisualContainer |
HorizontalOffset
Gets the horizontal offset of the scrolled content.
Declaration
public virtual double HorizontalOffset { get; }
Property Value
| Type |
|---|
| System.Double |
HScroll
Lets you force showing the scrollbar. Will throw exception if not yet hooked up with ScrollOwner. Therefore don't use in derived ctor and instead only use it after instance was fully constructed.
Declaration
public bool HScroll { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
HScrollBar
Gets the state describing for the horizontal scroll bar.
Declaration
public ScrollInfo HScrollBar { get; }
Property Value
| Type | Description |
|---|---|
| ScrollInfo | The horizontal scroll bar state. |
HScrollBarShadow
Gets a shadowed copy of the HScrollBar property. The object is created first thing in the ArrangeOverride method.
Declaration
public ScrollInfo HScrollBarShadow { get; }
Property Value
| Type | Description |
|---|---|
| ScrollInfo | The H scroll bar shadow. |
InnerFrame
Gets the inner frame. The children of the innerframe are the child frames (ScrollControlChildFrame) at the top, bottom, left and right of the control.
Declaration
public VisualContainer InnerFrame { get; }
Property Value
| Type |
|---|
| VisualContainer |
IsArrangeDirty
Declaration
protected bool IsArrangeDirty { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsInArrangeContent
Gets a value indicating whether this instance is currently processing OnArrangeContent(Size) method.
Declaration
public bool IsInArrangeContent { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsInArrangeOverride
Gets a value indicating whether this instance is currently handling ArrangeOverride(Size).
Declaration
public bool IsInArrangeOverride { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
MouseEventListeners
Gets the collection of mouse event listeners. Mouse events will be forwarded to the objects to this collection.
Declaration
public List<IMouseEventsTarget> MouseEventListeners { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<IMouseEventsTarget> | The mouse event listeners. |
ScrollOwner
Gets or sets a System.Windows.Controls.ScrollViewer element that controls scrolling behavior.
Declaration
public virtual ScrollViewer ScrollOwner { get; set; }
Property Value
| Type |
|---|
| System.Windows.Controls.ScrollViewer |
TopLeftFrameExtent
Gets or sets the top and left frame extent specifiying the height of the top frame and the width of the left frame.
Declaration
protected Size TopLeftFrameExtent { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Windows.Size | The top and left frame extent. |
VerticalOffset
Gets the vertical offset of the scrolled content.
Declaration
public virtual double VerticalOffset { get; }
Property Value
| Type |
|---|
| System.Double |
ViewportHeight
Gets the vertical size of the viewport for this content.
Declaration
public virtual double ViewportHeight { get; }
Property Value
| Type |
|---|
| System.Double |
ViewportWidth
Gets the horizontal size of the viewport for this content.
Declaration
public virtual double ViewportWidth { get; }
Property Value
| Type |
|---|
| System.Double |
VisualChildren
Gets a separate collection of visual children that is maintained independently from Children. You can add and remove Visuals through this collection without affecting the order of the Children collection. Adding and removing elements through the VisualChildren collection does not trigger calls to InvalidateMeasure.
Declaration
public VisualContainer.VisualCollection VisualChildren { get; }
Property Value
| Type | Description |
|---|---|
| VisualContainer.VisualCollection | The extra visual children. |
VisualChildrenCount
Gets the visual children count.
Declaration
protected override int VisualChildrenCount { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The visual children count. |
Overrides
VScroll
Lets you force showing the scrollbar. Will throw exception if not yet hooked up with ScrollOwner. Therefore don't use it in derived ctor and instead only use it after instance was fully constructed.
Declaration
public bool VScroll { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
VScrollBar
Gets the state describing for the vertical scroll bar.
Declaration
public ScrollInfo VScrollBar { get; }
Property Value
| Type | Description |
|---|---|
| ScrollInfo | The vertical scroll bar state. |
VScrollBarShadow
Gets a shadowed copy of the VScrollBar property. The object is created first thing in the ArrangeOverride method.
Declaration
public ScrollInfo VScrollBarShadow { get; }
Property Value
| Type | Description |
|---|---|
| ScrollInfo | The H scroll bar shadow. |
ZoomScale
Declaration
public double ZoomScale { get; set; }
Property Value
| Type |
|---|
| System.Double |
Methods
ArrangeOverride(Size)
Arranges all child frames. Each frames System.Windows.Controls.Canvas.LeftProperty, System.Windows.Controls.Canvas.TopProperty, System.Windows.Controls.Canvas.RightProperty and System.Windows.Controls.Canvas.BottomProperty properties are initialized. System.Windows.UIElement.Arrange(System.Windows.Rect) is called and a the System.Windows.UIElement.Clip property is set. After all child frames were arranged the virtual OnArrangeContent(Size) method is called.
Declaration
protected override sealed Size ArrangeOverride(Size arrangeSize)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Size | arrangeSize | The final area within the parent that this element should use to arrange itself and its children. |
Returns
| Type | Description |
|---|---|
| System.Windows.Size | Same size as given in arrangeSize. |
Overrides
CreateScrollControlChildFrame()
Creates the scroll control child frame object.
Declaration
protected virtual ScrollControlChildFrame CreateScrollControlChildFrame()
Returns
| Type |
|---|
| ScrollControlChildFrame |
Dispose(Boolean)
Declaration
public virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
GetChildFrame(Boolean, Boolean, Boolean, Boolean, VisualContainer)
Gets the specific child frame that matches the given parameters.
Declaration
public ScrollControlChildFrame GetChildFrame(bool isAtLeftSide, bool isAtTop, bool isAtRightSide, bool isAtBottom, VisualContainer frame)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | isAtLeftSide | if set to |
| System.Boolean | isAtTop | if set to |
| System.Boolean | isAtRightSide | if set to |
| System.Boolean | isAtBottom | if set to |
| VisualContainer | frame |
Returns
| Type |
|---|
| ScrollControlChildFrame |
GetVisualChild(Int32)
Gets the visual child at the given index.
Declaration
protected override Visual GetVisualChild(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The index. |
Returns
| Type |
|---|
| System.Windows.Media.Visual |
Overrides
HitTestCore(PointHitTestParameters)
Implements System.Windows.Media.Visual.HitTestCore(System.Windows.Media.PointHitTestParameters) to supply base element hit testing behavior (returning System.Windows.Media.HitTestResult).
Declaration
protected override HitTestResult HitTestCore(PointHitTestParameters hitTestParameters)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.PointHitTestParameters | hitTestParameters | Describes the hit test to perform, including the initial hit point. |
Returns
| Type | Description |
|---|---|
| System.Windows.Media.HitTestResult | Results of the test, including the evaluated point. |
Overrides
InvalidateVisual()
Invalidates the rendering of the element, and forces a complete new layout pass. System.Windows.UIElement.OnRender(System.Windows.Media.DrawingContext) is called after the layout cycle is completed. The method is overloaded in ScrollControl to redirect its call to InvalidateVisual(Boolean) with setArrangeDirty being true.
Declaration
public void InvalidateVisual()
InvalidateVisual(Boolean)
Invalidates the rendering of the element, and forces a complete new layout pass when setArrangeDirty is true. System.Windows.UIElement.OnRender(System.Windows.Media.DrawingContext) is called after the layout cycle is completed.
Declaration
public virtual void InvalidateVisual(bool setArrangeDirty)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | setArrangeDirty | if set to |
LineDown()
Scrolls down within content by one logical unit.
Declaration
public virtual void LineDown()
LineLeft()
Scrolls left within content by one logical unit.
Declaration
public virtual void LineLeft()
LineRight()
Scrolls right within content by one logical unit.
Declaration
public virtual void LineRight()
LineUp()
Scrolls up within content by one logical unit.
Declaration
public virtual void LineUp()
MakeVisible(Visual, Rect)
Override this method to scroll until the coordinate space of a System.Windows.Media.Visual object is visible. The default implementation of this method does not perform any scrolling.
Declaration
public virtual Rect MakeVisible(Visual visual, Rect rectangle)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.Visual | visual | A System.Windows.Media.Visual that becomes visible. |
| System.Windows.Rect | rectangle | A bounding rectangle that identifies the coordinate space to make visible. |
Returns
| Type | Description |
|---|---|
| System.Windows.Rect | A System.Windows.Rect that is visible. |
MouseWheelDown()
Scrolls down within content after a user clicks the wheel button on a mouse.
Declaration
public virtual void MouseWheelDown()
MouseWheelLeft()
Scrolls left within content after a user clicks the wheel button on a mouse.
Declaration
public virtual void MouseWheelLeft()
MouseWheelRight()
Scrolls right within content after a user clicks the wheel button on a mouse.
Declaration
public virtual void MouseWheelRight()
MouseWheelUp()
Scrolls up within content after a user clicks the wheel button on a mouse.
Declaration
public virtual void MouseWheelUp()
OnArrangeContent(Size)
Called after ArrangeOverride(Size) arranged all child frames.
Declaration
protected virtual void OnArrangeContent(Size arrangeSize)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Size | arrangeSize | The final area within the parent that this element should use to arrange itself and its children. |
OnArrangeOverride(Size, ref Boolean)
Called from ArrangeOverride(Size) first before any other code is executed in the method. You can change/set the isArrangeDirty flag to force OnArrangeContent(Size) to be called. By default content is only rearranged when this was previously indicated to the control with a InvalidateVisual(Boolean) call or when the
Declaration
protected virtual Size OnArrangeOverride(Size arrangeSize, ref bool isArrangeDirty)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Size | arrangeSize | The final area within the parent that this element should use to arrange itself and its children. |
| System.Boolean | isArrangeDirty | You can change/set the isArrangeDirty flag to force OnArrangeContent(Size) to be called. |
Returns
| Type | Description |
|---|---|
| System.Windows.Size | Same size as given in arrangeSize. |
OnBottomRightFrameExtentChanged()
Called when BottomRightFrameExtent was changed.
Declaration
protected virtual void OnBottomRightFrameExtentChanged()
OnDrop(DragEventArgs)
Declaration
protected override void OnDrop(DragEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DragEventArgs | e |
OnHScrollBarValueChanged(Object, EventArgs)
Value property in Horizontal scrollbar has changed.
Declaration
protected virtual void OnHScrollBarValueChanged(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| System.EventArgs | e |
OnHScrollBarValueChanging(Object, ValueChangingEventArgs)
Called before Value property in horizontal scrollbar is changed.
Declaration
protected virtual void OnHScrollBarValueChanging(object sender, ValueChangingEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| ValueChangingEventArgs | e |
OnInvalidated(Boolean)
Called when the InvalidateVisual(Boolean) method was called.
Declaration
protected virtual void OnInvalidated(bool isArrangeDirty)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | isArrangeDirty | if set to |
OnLoaded(RoutedEventArgs)
This virtual method is called from the System.Windows.FrameworkElement.Loaded event handler.
Do not override this method to wire events since a control can be unloaded and loaded multiple times during its lifetime.
Declaration
protected virtual void OnLoaded(RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.RoutedEventArgs | e | The System.Windows.RoutedEventArgs instance containing the event data. |
OnMouseDown(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseDownEvent�attached event reaches an element in its route that is derived from this class. The implementation of this method forwards the event to all objects in the MouseEventListeners collection.
Declaration
protected override void OnMouseDown(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. This event data reports details about the mouse button that was pressed and the handled state. |
OnMouseEnter(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseEnterEvent�attached event is raised on this element. The implementation of this method forwards the event to all objects in the MouseEventListeners collection.
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. |
OnMouseLeave(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseLeaveEvent�attached event is raised on this element. The implementation of this method forwards the event to all objects in the MouseEventListeners collection.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. |
OnMouseMove(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseMoveEvent�attached event reaches an element in its route that is derived from this class. The implementation of this method forwards the event to all objects in the MouseEventListeners collection.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. |
OnMouseUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseUpEvent�routed event reaches an element in its route that is derived from this class. The implementation of this method forwards the event to all objects in the MouseEventListeners collection.
Declaration
protected override void OnMouseUp(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the mouse button was released. |
OnMouseWheel(MouseWheelEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseWheelEvent�attached event reaches an element in its route that is derived from this class. The implementation of this method forwards the event to all objects in the MouseEventListeners collection.
Declaration
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseWheelEventArgs | e | The System.Windows.Input.MouseWheelEventArgs that contains the event data. |
OnPreviewMouseDown(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseDownEvent attached�routed event reaches an element in its route that is derived from this class. The implementation of this method forwards the event to all objects in the MouseEventListeners collection.
Declaration
protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that one or more mouse buttons were pressed. |
OnPreviewMouseMove(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseMoveEvent�attached event reaches an element in its route that is derived from this class.
Declaration
protected override void OnPreviewMouseMove(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. |
OnPreviewMouseUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseUpEvent�attached event reaches an element in its route that is derived from this class. The implementation of this method forwards the event to all objects in the MouseEventListeners collection.
Declaration
protected override void OnPreviewMouseUp(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that one or more mouse buttons were released. |
OnPreviewMouseWheel(MouseWheelEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.PreviewMouseWheelEvent�attached event reaches an element in its route that is derived from this class.
The implementation of this method forwards the event to all objects in the MouseEventListeners collection.
Declaration
protected override void OnPreviewMouseWheel(MouseWheelEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseWheelEventArgs | e | The System.Windows.Input.MouseWheelEventArgs that contains the event data. |
OnRender(DrawingContext)
Draws a transparent rectangle across the whole area.
Declaration
protected override void OnRender(DrawingContext drawingContext)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Media.DrawingContext | drawingContext | The drawing context. |
Overrides
OnRenderSizeChanged(SizeChangedInfo)
Calls the virtuals OnArrangeContent(Size) method and raises the System.Windows.FrameworkElement.SizeChanged event, using the specified information as part of the eventual event data
Declaration
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.SizeChangedInfo | sizeInfo | Details of the old and new size involved in the change. |
OnScrollControlMouseDown(ScrollControlMouseButtonEventArgs)
Virtual method reporting the mouse button was pressed
Declaration
protected virtual void OnScrollControlMouseDown(ScrollControlMouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollControlMouseButtonEventArgs | e |
OnScrollControlMouseMove(ScrollControlMouseEventArgs)
Virtual method reporting the mouse was pressed
Declaration
protected virtual void OnScrollControlMouseMove(ScrollControlMouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollControlMouseEventArgs | e |
OnScrollControlMouseUp(ScrollControlMouseButtonEventArgs)
Virtual method reporting the mouse button was pressed
Declaration
protected virtual void OnScrollControlMouseUp(ScrollControlMouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollControlMouseButtonEventArgs | e |
OnScrollControlPreviewMouseDown(ScrollControlMouseButtonEventArgs)
Virtual method reporting the mouse button was pressed
Declaration
protected virtual void OnScrollControlPreviewMouseDown(ScrollControlMouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollControlMouseButtonEventArgs | e |
OnScrollControlPreviewMouseMove(ScrollControlMouseEventArgs)
Virtual method reporting the mouse was pressed
Declaration
protected virtual void OnScrollControlPreviewMouseMove(ScrollControlMouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollControlMouseEventArgs | e |
OnScrollControlPreviewMouseUp(ScrollControlMouseButtonEventArgs)
Virtual method reporting the mouse button was pressed
Declaration
protected virtual void OnScrollControlPreviewMouseUp(ScrollControlMouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| ScrollControlMouseButtonEventArgs | e |
OnTopLeftFrameExtentChanged()
Called when TopLeftFrameExtent was changed.
Declaration
protected virtual void OnTopLeftFrameExtentChanged()
OnUnloaded(RoutedEventArgs)
This virtual method is called from the System.Windows.FrameworkElement.Unloaded event handler.
Override this method to clear cached settings (e.g. rendered styles, visibility of rows) when the control was unloaded. Do not unwire events here since a control can be unloaded and loaded multiple times during its lifetime.
Declaration
protected virtual void OnUnloaded(RoutedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.RoutedEventArgs | e | The System.Windows.RoutedEventArgs instance containing the event data. |
OnVScrollBarValueChanged(Object, EventArgs)
Value property in Vertical scrollbar has changed.
Declaration
protected virtual void OnVScrollBarValueChanged(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| System.EventArgs | e |
OnVScrollBarValueChanging(Object, ValueChangingEventArgs)
Called before Value property in Vertical scrollbar is changed.
Declaration
protected virtual void OnVScrollBarValueChanging(object sender, ValueChangingEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| ValueChangingEventArgs | e |
PageDown()
Scrolls down within content by one page.
Declaration
public virtual void PageDown()
PageLeft()
Scrolls left within content by one page.
Declaration
public virtual void PageLeft()
PageRight()
Scrolls right within content by one page.
Declaration
public virtual void PageRight()
PageUp()
Scrolls up within content by one page.
Declaration
public virtual void PageUp()
SetFrameProperties(VisualContainer, ScrollControlChildFrame)
Declaration
protected virtual void SetFrameProperties(VisualContainer parent, ScrollControlChildFrame child)
Parameters
| Type | Name | Description |
|---|---|---|
| VisualContainer | parent | |
| ScrollControlChildFrame | child |
SetHorizontalOffset(Double)
Sets the amount of horizontal offset.
Declaration
public virtual void SetHorizontalOffset(double offset)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | offset | The degree to which content is horizontally offset from the containing viewport. |
SetVerticalOffset(Double)
Sets the amount of vertical offset.
Declaration
public virtual void SetVerticalOffset(double offset)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | offset | The degree to which content is vertically offset from the containing viewport. |
Events
ScrollControlMouseDown
Event reporting the mouse button was pressed
Declaration
public event ScrollControlMouseButtonEventHandler ScrollControlMouseDown
Event Type
| Type |
|---|
| ScrollControlMouseButtonEventHandler |
ScrollControlMouseMove
Event reporting the mouse was pressed
Declaration
public event ScrollControlMouseEventHandler ScrollControlMouseMove
Event Type
| Type |
|---|
| ScrollControlMouseEventHandler |
ScrollControlMouseUp
Event reporting the mouse button was pressed
Declaration
public event ScrollControlMouseButtonEventHandler ScrollControlMouseUp
Event Type
| Type |
|---|
| ScrollControlMouseButtonEventHandler |
ScrollControlPreviewMouseDown
Event reporting the mouse button was pressed
Declaration
public event ScrollControlMouseButtonEventHandler ScrollControlPreviewMouseDown
Event Type
| Type |
|---|
| ScrollControlMouseButtonEventHandler |
ScrollControlPreviewMouseMove
Event reporting the mouse was pressed
Declaration
public event ScrollControlMouseEventHandler ScrollControlPreviewMouseMove
Event Type
| Type |
|---|
| ScrollControlMouseEventHandler |
ScrollControlPreviewMouseUp
Event reporting the mouse button was pressed
Declaration
public event ScrollControlMouseButtonEventHandler ScrollControlPreviewMouseUp
Event Type
| Type |
|---|
| ScrollControlMouseButtonEventHandler |
Explicit Interface Implementations
IScrollBarProvider.Element
Declaration
FrameworkElement IScrollBarProvider.Element { get; }
Returns
| Type |
|---|
| System.Windows.FrameworkElement |