WPF

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ScrollAxisControl - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ScrollAxisControl

    ScrollAxisControl provides support for scrolling through rows and columns. The logic to map from row or column index to scroll position and back is implemented in the ScrollAxisBase which is accessed through the ScrollRows and ScrollColumns property.

    You can assign a collection that implements ILineSizeHost and manages row heights or column widths to the RowHeightsProvider and ColumnWidthsProvider. ScrollAxisBase will use information from these objects to map from row or column index to scroll position and back map from row or column index to scroll position and back.

    Rows and Columns can have varying size and they can be hidden. They can be frozen at the top, bottom, left and right side. Both pixel scrolling and non-pixel scrolling is supported.

    ScrollBar logic and child frame logic is implemented in the base ScrollControl class.

    Inheritance
    System.Object
    VisualContainer
    ScrollControl
    ScrollAxisControl
    VirtualizingCellsControl
    EditScrollControl
    Implements
    IScrollBarProvider
    System.Windows.Controls.Primitives.IScrollInfo
    System.IDisposable
    Inherited Members
    ScrollControl.ZoomScaleProperty
    ScrollControl.ScrollControlMouseMoveEvent
    ScrollControl.ScrollControlMouseUpEvent
    ScrollControl.ScrollControlMouseDownEvent
    ScrollControl.ScrollControlPreviewMouseMoveEvent
    ScrollControl.ScrollControlPreviewMouseUpEvent
    ScrollControl.ScrollControlPreviewMouseDownEvent
    ScrollControl.OnLoaded(RoutedEventArgs)
    ScrollControl.OnUnloaded(RoutedEventArgs)
    ScrollControl.OnRender(DrawingContext)
    ScrollControl.HitTestCore(PointHitTestParameters)
    ScrollControl.ArrangeOverride(Size)
    ScrollControl.InvalidateVisual()
    ScrollControl.InvalidateVisual(Boolean)
    ScrollControl.OnArrangeContent(Size)
    ScrollControl.OnTopLeftFrameExtentChanged()
    ScrollControl.OnBottomRightFrameExtentChanged()
    ScrollControl.GetChildFrame(Boolean, Boolean, Boolean, Boolean, VisualContainer)
    ScrollControl.SetFrameProperties(VisualContainer, ScrollControlChildFrame)
    ScrollControl.CreateScrollControlChildFrame()
    ScrollControl.GetVisualChild(Int32)
    ScrollControl.OnVScrollBarValueChanging(Object, ValueChangingEventArgs)
    ScrollControl.OnVScrollBarValueChanged(Object, EventArgs)
    ScrollControl.OnHScrollBarValueChanging(Object, ValueChangingEventArgs)
    ScrollControl.OnHScrollBarValueChanged(Object, EventArgs)
    ScrollControl.MouseWheelUp()
    ScrollControl.MouseWheelDown()
    ScrollControl.MouseWheelLeft()
    ScrollControl.MouseWheelRight()
    ScrollControl.SetVerticalOffset(Double)
    ScrollControl.SetHorizontalOffset(Double)
    ScrollControl.MakeVisible(Visual, Rect)
    ScrollControl.OnMouseEnter(MouseEventArgs)
    ScrollControl.OnMouseLeave(MouseEventArgs)
    ScrollControl.OnMouseDown(MouseButtonEventArgs)
    ScrollControl.OnMouseMove(MouseEventArgs)
    ScrollControl.OnMouseUp(MouseButtonEventArgs)
    ScrollControl.OnPreviewMouseWheel(MouseWheelEventArgs)
    ScrollControl.OnPreviewMouseDown(MouseButtonEventArgs)
    ScrollControl.OnPreviewMouseMove(MouseEventArgs)
    ScrollControl.OnDrop(DragEventArgs)
    ScrollControl.OnPreviewMouseUp(MouseButtonEventArgs)
    ScrollControl.OnScrollControlMouseMove(ScrollControlMouseEventArgs)
    ScrollControl.OnScrollControlMouseUp(ScrollControlMouseButtonEventArgs)
    ScrollControl.OnScrollControlMouseDown(ScrollControlMouseButtonEventArgs)
    ScrollControl.OnScrollControlPreviewMouseMove(ScrollControlMouseEventArgs)
    ScrollControl.OnScrollControlPreviewMouseUp(ScrollControlMouseButtonEventArgs)
    ScrollControl.OnScrollControlPreviewMouseDown(ScrollControlMouseButtonEventArgs)
    ScrollControl.ZoomScale
    ScrollControl.IsArrangeDirty
    ScrollControl.IsInArrangeOverride
    ScrollControl.IsInArrangeContent
    ScrollControl.TopLeftFrameExtent
    ScrollControl.BottomRightFrameExtent
    ScrollControl.BackgroundFrame
    ScrollControl.ForegroundFrame
    ScrollControl.ElementsFrame
    ScrollControl.InnerFrame
    ScrollControl.GraphicFrame
    ScrollControl.VisualChildren
    ScrollControl.VisualChildrenCount
    ScrollControl.VScroll
    ScrollControl.HScroll
    ScrollControl.IScrollBarProvider.Element
    ScrollControl.HScrollBar
    ScrollControl.VScrollBar
    ScrollControl.ScrollOwner
    ScrollControl.CanHorizontallyScroll
    ScrollControl.CanVerticallyScroll
    ScrollControl.HorizontalOffset
    ScrollControl.VerticalOffset
    ScrollControl.ExtentWidth
    ScrollControl.ExtentHeight
    ScrollControl.ViewportWidth
    ScrollControl.ViewportHeight
    ScrollControl.HScrollBarShadow
    ScrollControl.VScrollBarShadow
    ScrollControl.AutoScroller
    ScrollControl.MouseEventListeners
    ScrollControl.ScrollControlMouseMove
    ScrollControl.ScrollControlMouseUp
    ScrollControl.ScrollControlMouseDown
    ScrollControl.ScrollControlPreviewMouseMove
    ScrollControl.ScrollControlPreviewMouseUp
    ScrollControl.ScrollControlPreviewMouseDown
    VisualContainer.WantsMouseInputProperty
    VisualContainer.WantsKeyInputProperty
    VisualContainer.CellRenderBoundsProperty
    VisualContainer.GetWantsMouseInput(DependencyObject, UIElement)
    VisualContainer.SetWantsMouseInput(DependencyObject, Nullable<Boolean>)
    VisualContainer.SetWantsKeyInput(DependencyObject, Boolean)
    VisualContainer.GetWantsKeyInput(DependencyObject)
    VisualContainer.GetRenderBoundsInherited(DependencyObject)
    VisualContainer.GetRenderBounds(DependencyObject)
    VisualContainer.SetRenderBounds(DependencyObject, Rect)
    VisualContainer.GetParent(DependencyObject)
    VisualContainer.HitTestCore(GeometryHitTestParameters)
    VisualContainer.Dispose()
    VisualContainer.Children
    Namespace: Syncfusion.Windows.Controls.Scroll
    Assembly: Syncfusion.GridCommon.Wpf.dll
    Syntax
    public abstract class ScrollAxisControl : ScrollControl, IScrollBarProvider, IScrollInfo, IDisposable

    Constructors

    ScrollAxisControl()

    Initializes a new instance of the ScrollAxisControl class.

    Declaration
    public ScrollAxisControl()

    Properties

    AllowPixelScrollPadding

    Gets or sets a value indicating whether [allow pixel scroll padding]. Set this to false if you don't want the pixel scroll to take a padding value of 1.

    Declaration
    public bool AllowPixelScrollPadding { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if [allow pixel scroll padding]; otherwise, false.

    ColumnWidthsProvider

    Gets or sets the column widths provider.

    Declaration
    public ILineSizeHost ColumnWidthsProvider { get; set; }
    Property Value
    Type Description
    ILineSizeHost

    The column widths provider.

    HorizontalPixelScroll

    Gets or sets a value indicating whether horizontal pixel scroll is enabled.

    Declaration
    public bool HorizontalPixelScroll { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if horizontal pixel scrolling is enabled; otherwise, false.

    LeftColumnIndex

    Gets or sets the index of the left column.

    Declaration
    public int LeftColumnIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    The index of the left column.

    RowHeightsProvider

    Gets or sets the row heights provider.

    Declaration
    public ILineSizeHost RowHeightsProvider { get; set; }
    Property Value
    Type Description
    ILineSizeHost

    The row heights provider.

    ScrollColumns

    Gets the scroll axis with logic to map from column index to scroll position and back.

    Declaration
    public ScrollAxisBase ScrollColumns { get; }
    Property Value
    Type Description
    ScrollAxisBase

    The scroll axis for columns.

    ScrollRows

    Gets the scroll axis with logic to map from row index to scroll position and back.

    Declaration
    public ScrollAxisBase ScrollRows { get; }
    Property Value
    Type Description
    ScrollAxisBase

    The scroll axis for rows.

    TopRowIndex

    Gets or sets the index of the top row.

    Declaration
    public int TopRowIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    The index of the top row.

    VerticalPixelScroll

    Gets or sets a value indicating whether vertical pixel scroll is enabled.

    Declaration
    public bool VerticalPixelScroll { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if vertical pixel scrolling is enabled; otherwise, false.

    Methods

    CanAutoCalculateWidth()

    Declaration
    protected virtual bool CanAutoCalculateWidth()
    Returns
    Type Description
    System.Boolean

    CreateScrollAxis(Orientation, Boolean, IScrollBar, ILineSizeHost)

    Creates the row or column scroll axis. The default implementation of this method creates either a PixelScrollAxis or LineScrollAxis object. You can override this method if you want to add support for another custom tailored scroll axis object.

    Declaration
    protected virtual ScrollAxisBase CreateScrollAxis(Orientation orientation, bool pixelScroll, IScrollBar scrollBar, ILineSizeHost lineSizes)
    Parameters
    Type Name Description
    System.Windows.Controls.Orientation orientation

    The orientation (Vertical for row scrolling, Horizontal for column scrolling)

    System.Boolean pixelScroll

    if set to true pixel scroll; otherwise line scrolling.

    IScrollBar scrollBar

    The state of the scroll bar.

    ILineSizeHost lineSizes

    An object that provides row or column sizes.

    Returns
    Type Description
    ScrollAxisBase

    The scroll axis object.

    Dispose(Boolean)

    Declaration
    public override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    ScrollControl.Dispose(Boolean)

    GetClipRect(ScrollAxisRegion, ScrollAxisRegion)

    Gets the clipping bounds for the specified row and column region.

    Declaration
    public Rect GetClipRect(ScrollAxisRegion rowRegion, ScrollAxisRegion columnRegion)
    Parameters
    Type Name Description
    ScrollAxisRegion rowRegion

    The row region.

    ScrollAxisRegion columnRegion

    The column region.

    Returns
    Type Description
    System.Windows.Rect

    A System.Windows.Rect with clipping bounds.

    IsCellVisible(RowColumnIndex)

    Determines whether the specified cell is visible.

    Declaration
    public bool IsCellVisible(RowColumnIndex cellRowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex cellRowColumnIndex

    Index of the cell row column.

    Returns
    Type Description
    System.Boolean

    true if the specified cell is visible; otherwise, false.

    IsColumnVisible(Int32)

    Determines whether the column with the specified column index is visible.

    Declaration
    public bool IsColumnVisible(int columnIndex)
    Parameters
    Type Name Description
    System.Int32 columnIndex

    Index of the column.

    Returns
    Type Description
    System.Boolean

    true if column is visible; otherwise, false.

    IsRowVisible(Int32)

    Determines whether the row with the specified row index is visible.

    Declaration
    public bool IsRowVisible(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Index of the row.

    Returns
    Type Description
    System.Boolean

    true if row is visible; otherwise, false.

    LineDown()

    Scrolls down one row.

    Declaration
    public override void LineDown()
    Overrides
    ScrollControl.LineDown()

    LineLeft()

    Scrolls left one left column.

    Declaration
    public override void LineLeft()
    Overrides
    ScrollControl.LineLeft()

    LineRight()

    Scrolls right one column.

    Declaration
    public override void LineRight()
    Overrides
    ScrollControl.LineRight()

    LineUp()

    Scrolls up one row.

    Declaration
    public override void LineUp()
    Overrides
    ScrollControl.LineUp()

    MeasureOverride(Size)

    Declaration
    protected override Size MeasureOverride(Size constraint)
    Parameters
    Type Name Description
    System.Windows.Size constraint
    Returns
    Type Description
    System.Windows.Size
    Overrides
    VisualContainer.MeasureOverride(Size)

    OnArrangeOverride(Size, ref Boolean)

    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.

    ScrollAxisControl overrides this method to update the scroll axis with controls dimensions given by arrangeSize parameter.

    Declaration
    protected override 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

    if set to true the control will call OnArrangeContent in the next arrange layout pass (i.e. when ArrangeOverride is called).

    Returns
    Type Description
    System.Windows.Size

    Same size as given in arrangeSize.

    Overrides
    ScrollControl.OnArrangeOverride(Size, ref Boolean)

    OnInvalidated(Boolean)

    Called when the InvalidateVisual(Boolean) method was called.

    Declaration
    protected override void OnInvalidated(bool isArrangeDirty)
    Parameters
    Type Name Description
    System.Boolean isArrangeDirty

    if set to true indicates that OnArrangeContent(Size) will be called when control gets updated. Otherwise the OnArrangeContent will be skipped and only OnRender will be called.

    Overrides
    ScrollControl.OnInvalidated(Boolean)

    OnMouseWheel(MouseWheelEventArgs)

    This is the method that responds to the MouseWheel event.

    Declaration
    protected override void OnMouseWheel(MouseWheelEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseWheelEventArgs e

    Event Arguments

    Overrides
    ScrollControl.OnMouseWheel(MouseWheelEventArgs)

    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

    ScrollAxisControl overrides this method to update the scroll axis with controls dimensions given by sizeInfo parameter.

    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.

    Overrides
    ScrollControl.OnRenderSizeChanged(SizeChangedInfo)

    OnScrollLayoutChanged()

    Called when settings of ScrollRows or ScrollColumns were changed.

    Declaration
    protected virtual void OnScrollLayoutChanged()

    PageDown()

    Scrolls down one page of rows.

    Declaration
    public override void PageDown()
    Overrides
    ScrollControl.PageDown()

    PageLeft()

    Scrolls left one page of columns.

    Declaration
    public override void PageLeft()
    Overrides
    ScrollControl.PageLeft()

    PageRight()

    Scrolls right one page of columns.

    Declaration
    public override void PageRight()
    Overrides
    ScrollControl.PageRight()

    PageUp()

    Scrolls up one page of rows.

    Declaration
    public override void PageUp()
    Overrides
    ScrollControl.PageUp()

    PointToCellRowColumnIndex(MouseEventArgs)

    Determines the cell under the mouse location.

    Declaration
    public RowColumnIndex PointToCellRowColumnIndex(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The System.Windows.Input.MouseEventArgs instance containing the event data.

    Returns
    Type Description
    RowColumnIndex

    The cells row and column index under the mouse location.

    PointToCellRowColumnIndex(Point)

    Determines the cell under a given point.

    Declaration
    public RowColumnIndex PointToCellRowColumnIndex(Point p)
    Parameters
    Type Name Description
    System.Windows.Point p

    The point in client coordinates.

    Returns
    Type Description
    RowColumnIndex

    The cells row and column index under the point.

    PointToCellRowColumnIndexOutsideCells(Point, Boolean)

    Determines the cell under a given point.

    Declaration
    public RowColumnIndex PointToCellRowColumnIndexOutsideCells(Point p, bool allowOutsideLines)
    Parameters
    Type Name Description
    System.Windows.Point p

    The point in client coordinates.

    System.Boolean allowOutsideLines

    Set this true if point can be below corner of last line.

    Returns
    Type Description
    RowColumnIndex

    The cells row and column index under the point.

    ScrollToBottom()

    Scrolls to bottom.

    Declaration
    public virtual void ScrollToBottom()

    ScrollToLeftEnd()

    Scrolls to left end.

    Declaration
    public virtual void ScrollToLeftEnd()

    ScrollToRightEnd()

    Scrolls to right end.

    Declaration
    public virtual void ScrollToRightEnd()

    ScrollToTop()

    Scrolls to top.

    Declaration
    public virtual void ScrollToTop()

    UpdateAxis(Size)

    Updates the row and column axis with this control size and initializes Clip position.

    Declaration
    public void UpdateAxis(Size arrangeSize)
    Parameters
    Type Name Description
    System.Windows.Size arrangeSize

    Size of the arrange.

    Implements

    IScrollBarProvider
    System.Windows.Controls.Primitives.IScrollInfo
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved