Class PixelScrollAxis
PixelScrollAxis implements scrolling logic for both horizontal and vertical scrolling in a ScrollAxisBase. Logical units in the ScrollAxisBase are called "Lines".
PixelScrollAxis supports pixel scrolling and calculates the total height or width of all lines.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Grid.ScrollAxis
Assembly: Syncfusion.SfGridCommon.UWP.dll
Syntax
public class PixelScrollAxis : ScrollAxisBase, IDisposable
Constructors
PixelScrollAxis(IScrollBar, ILineSizeHost, IDistancesHost)
Initializes a new instance of the PixelScrollAxis class.
Declaration
public PixelScrollAxis(IScrollBar sb, ILineSizeHost scrollLinesHost, IDistancesHost distancesHost)
Parameters
Type | Name | Description |
---|---|---|
IScrollBar | sb | The scrollbar state. |
ILineSizeHost | scrollLinesHost | The scroll lines host. |
IDistancesHost | distancesHost | The distances host. |
PixelScrollAxis(ScrollAxisBase, IScrollBar, ILineSizeHost, IDistancesHost)
Initializes a new instance of the PixelScrollAxis class which is nested as a single line in a parent scroll axis.
Declaration
public PixelScrollAxis(ScrollAxisBase parentScrollAxis, IScrollBar sb, ILineSizeHost scrollLinesHost, IDistancesHost distancesHost)
Parameters
Type | Name | Description |
---|---|---|
ScrollAxisBase | parentScrollAxis | The parent scroll axis. |
IScrollBar | sb | The scrollbar state. |
ILineSizeHost | scrollLinesHost | The scroll lines host. |
IDistancesHost | distancesHost | The distances host. |
Properties
DefaultLineSize
Gets or sets the default size of lines.
Declaration
public override double DefaultLineSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default size of lines. |
Overrides
FooterExtent
Gets the footer extent. This is total height (or width) of the footer lines.
Declaration
public override double FooterExtent { get; }
Property Value
Type | Description |
---|---|
System.Double | The footer extent. |
Overrides
HeaderExtent
Gets the header extent. This is total height (or width) of the header lines.
Declaration
public override double HeaderExtent { get; }
Property Value
Type | Description |
---|---|
System.Double | The header extent. |
Overrides
IsPixelScroll
Gets a value indicating whether this axis supports pixel scrolling.
Declaration
public override bool IsPixelScroll { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Overrides
LineCount
Gets or sets the line count.
Declaration
public override int LineCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The line count. |
Overrides
ScrollLineIndex
Gets or sets the index of the first visible Line in the Body region.
Declaration
public override int ScrollLineIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the scroll line. |
Overrides
TotalExtent
Gets the total extent of all line sizes.
Declaration
public double TotalExtent { get; }
Property Value
Type | Description |
---|---|
System.Double | The total extent. |
ViewSize
Gets the view size of the (either height or width) of the parent control. Normally the ViewSize is the same as RenderSize. Only if the parent control has more space then needed to display all lines, the ViewSize will be less. In such case the ViewSize is the total height for all lines.
Declaration
public override double ViewSize { get; }
Property Value
Type | Description |
---|---|
System.Double | The size of the view. |
Overrides
Methods
AlignScrollLine()
Aligns the scroll line.
Declaration
public override void AlignScrollLine()
Overrides
Dispose(Boolean)
Dispose the live resources used by the PixelScrollAxis class.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Dispose the instance, if it is True |
Overrides
GetNextScrollLineIndex(Int32)
Gets the index of the next scroll line.
Declaration
public override int GetNextScrollLineIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Returns
Type |
---|
System.Int32 |
Overrides
GetPreviousScrollLineIndex(Int32)
Gets the index of the previous scroll line.
Declaration
public override int GetPreviousScrollLineIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Returns
Type |
---|
System.Int32 |
Overrides
GetScrollLineIndex(out Int32, out Double, Boolean)
Gets the index of the scroll line.
Declaration
public override void GetScrollLineIndex(out int scrollLineIndex, out double scrollLineDelta, bool isRightToLeft)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | scrollLineIndex | Index of the scroll linde. |
System.Double | scrollLineDelta | The scroll line delta. |
System.Boolean | isRightToLeft |
Overrides
MouseWheel(Int32)
This method is called in response to a MouseWheel event.
Declaration
public override void MouseWheel(int delta)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | delta | The delta. |
Overrides
OnLinesInserted(Int32, Int32)
Called when lines were inserted in ScrollLinesHost.
Declaration
protected override void OnLinesInserted(int insertAt, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | insertAt | Index of the first inserted line. |
System.Int32 | count | The count. |
Overrides
OnLinesRemoved(Int32, Int32)
Called when lines were removed in ScrollLinesHost.
Declaration
protected override void OnLinesRemoved(int removeAt, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | removeAt | Index of the first removed line. |
System.Int32 | count | The count. |
Overrides
RangeToPoints(ScrollAxisRegion, Int32, Int32, Boolean)
Returns the first and last point for the given lines in a region.
Declaration
public override DoubleSpan RangeToPoints(ScrollAxisRegion region, int first, int last, bool allowEstimatesForOutOfViewLines)
Parameters
Type | Name | Description |
---|---|---|
ScrollAxisRegion | region | The region. |
System.Int32 | first | The index of the first line. |
System.Int32 | last | The index of the last line. |
System.Boolean | allowEstimatesForOutOfViewLines | if set to |
Returns
Type |
---|
DoubleSpan |
Overrides
RangeToRegionPoints(Int32, Int32, Boolean)
Returns an array with 3 ranges indicating the first and last point for the given lines in each region.
Declaration
public override DoubleSpan[] RangeToRegionPoints(int first, int last, bool allowEstimatesForOutOfViewLines)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | first | The index of the first line. |
System.Int32 | last | The index of the last line. |
System.Boolean | allowEstimatesForOutOfViewLines | if set to |
Returns
Type |
---|
DoubleSpan[] |
Overrides
ResetLineResize()
Resets temporary value for line size after a resize operation
Declaration
public override void ResetLineResize()
Overrides
ScrollInView(Int32, Double)
Scrolls the line into viewable area.
Declaration
public override void ScrollInView(int lineIndex, double lineSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | lineIndex | Index of the line. |
System.Double | lineSize | Size of the line. |
Overrides
ScrollToNextLine()
Scrolls to next line.
Declaration
public override void ScrollToNextLine()
Overrides
ScrollToNextPage()
Scrolls to next page.
Declaration
public override void ScrollToNextPage()
Overrides
ScrollToPreviousLine()
Scrolls to previous line.
Declaration
public override void ScrollToPreviousLine()
Overrides
ScrollToPreviousPage()
Scrolls to previous page.
Declaration
public override void ScrollToPreviousPage()
Overrides
SetFooterLineCount(Int32)
Sets the footer line count.
Declaration
protected override void SetFooterLineCount(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The value. |
Overrides
SetHeaderLineCount(Int32)
Sets the header line count.
Declaration
protected override void SetHeaderLineCount(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The value. |
Overrides
SetLineHiddenState(Int32, Int32, Boolean)
Sets the hidden state of the lines.
Declaration
public override void SetLineHiddenState(int from, int to, bool hide)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | from | From. |
System.Int32 | to | To. |
System.Boolean | hide | if set to |
Overrides
SetLineResize(Int32, Double)
Set temporary value for a line size during a resize operation without commiting value to SrollLinesHost.
Declaration
public override void SetLineResize(int index, double size)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
System.Double | size | The size. |
Overrides
SetLineSize(Int32, Int32, Double)
Sets the size of the lines.
Declaration
public override void SetLineSize(int from, int to, double size)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | from | From. |
System.Int32 | to | To. |
System.Double | size | The size. |
Overrides
SetNestedLines(Int32, IDistanceCounterCollection)
Associates a collection of nested lines with a line in this axis.
Declaration
public void SetNestedLines(int index, IDistanceCounterCollection nestedLines)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
IDistanceCounterCollection | nestedLines | The nested lines. |
SetScrollLineIndex(Int32, Double)
Sets the index of the scroll line.
Declaration
public override void SetScrollLineIndex(int scrollLineIndex, double scrollLineDelta)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | scrollLineIndex | Index of the scroll linde. |
System.Double | scrollLineDelta | The scroll line delta. |
Overrides
UpdateScrollBar()
Initialize scrollbar properties from header and footer size and total size of lines in body.
Declaration
public override void UpdateScrollBar()