Xamarin.iOS

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class LineSizeCollection

    Show / Hide Table of Contents

    Class LineSizeCollection

    A collection that manages lines with varying height and hidden state. It has properties for header and footer lines, total line count, default size of a line and also lets you add nested collections.

    Inheritance
    System.Object
    LineSizeCollection
    EmptyLineSizeCollection
    Implements
    IPaddedEditableLineSizeHost
    IEditableLineSizeHost
    ILineSizeHost
    IDistancesHost
    INestedDistancesHost
    System.IDisposable
    Namespace: Syncfusion.GridCommon.ScrollAxis
    Assembly: Syncfusion.GridCommon.Portable.dll
    Syntax
    public class LineSizeCollection : Object, IPaddedEditableLineSizeHost, IEditableLineSizeHost, ILineSizeHost, IDistancesHost, INestedDistancesHost, IDisposable

    Constructors

    LineSizeCollection()

    Initializes a new instance of the LineSizeCollection class.

    Declaration
    public LineSizeCollection()

    Fields

    Empty

    Returns an empty collection.

    Declaration
    public static readonly LineSizeCollection Empty
    Field Value
    Type Description
    LineSizeCollection

    Properties

    DefaultLineSize

    Gets or sets the default size of lines.

    Declaration
    public double DefaultLineSize { get; set; }
    Property Value
    Type Description
    System.Double

    The default size of lines.

    Distances

    Gets the distances collection which is used internally for mapping from a point position to a line index and vice versa.

    Declaration
    public IDistanceCounterCollection Distances { get; }
    Property Value
    Type Description
    IDistanceCounterCollection

    The distances collection which is used internally for mapping from a point position to a line index and vice versa.

    FooterLineCount

    Gets or sets the footer line count.

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

    The footer line count.

    HeaderLineCount

    Gets or sets the header line count.

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

    The header line count.

    Item[Int32]

    Gets or sets the line size at the specified index.

    Declaration
    public double this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    index value

    Property Value
    Type Description
    System.Double

    The line size at the specified index.

    LineCount

    Gets or sets the line count.

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

    The line count.

    PaddingDistance

    Gets or sets the padding distance for the line.

    Declaration
    public double PaddingDistance { get; set; }
    Property Value
    Type Description
    System.Double

    The padding distance for the line.

    SupportsInsertRemove

    Gets a value indicating whether the host supports inserting and removing lines or not.

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

    The boolean value indicating whether the host supports inserting and removing lines.

    SupportsNestedLines

    Gets a value indicating whether the host supports nesting.

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

    A boolean value indicating whether the host supports nesting.

    TotalExtent

    Gets the total extent which is the total of all line sizes. Note: This property only works if the DistanceCounterCollection has been setup for pixel scrolling, otherwise it returns System.Double.NaN.

    Declaration
    public virtual double TotalExtent { get; }
    Property Value
    Type Description
    System.Double

    The total extent which is the total of all line sizes or System.Double.NaN.

    Methods

    add_DefaultLineSizeChanged(DefaultLineSizeChangedEventHandler)

    Declaration
    public void add_DefaultLineSizeChanged(DefaultLineSizeChangedEventHandler value)
    Parameters
    Type Name Description
    DefaultLineSizeChangedEventHandler value

    add_LineHiddenChanged(HiddenRangeChangedEventHandler)

    Declaration
    public void add_LineHiddenChanged(HiddenRangeChangedEventHandler value)
    Parameters
    Type Name Description
    HiddenRangeChangedEventHandler value

    add_LinesInserted(LinesInsertedEventHandler)

    Declaration
    public void add_LinesInserted(LinesInsertedEventHandler value)
    Parameters
    Type Name Description
    LinesInsertedEventHandler value

    add_LineSizeChanged(RangeChangedEventHandler)

    Declaration
    public void add_LineSizeChanged(RangeChangedEventHandler value)
    Parameters
    Type Name Description
    RangeChangedEventHandler value

    add_LinesRemoved(LinesRemovedEventHandler)

    Declaration
    public void add_LinesRemoved(LinesRemovedEventHandler value)
    Parameters
    Type Name Description
    LinesRemovedEventHandler value

    CreateMoveLines()

    Creates the object which holds temporary state when moving lines.

    Declaration
    public IEditableLineSizeHost CreateMoveLines()
    Returns
    Type Description
    IEditableLineSizeHost

    The object which holds temporary state when moving lines.

    DeferRefresh()

    Enter the defer cycle so that all data operations in view is performed and update once.

    Declaration
    public IDisposable DeferRefresh()
    Returns
    Type Description
    System.IDisposable

    The disposable object to release the allocated resources.

    Dispose()

    Releases the managed and unmanaged resources.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Releases the unmanaged resources used by the component and optionally releases the managed resources.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    if true - release both managed and unmanaged resources; if false - release only unmanaged resources.

    GetDefaultLineSize()

    Returns the default line size.

    Declaration
    public double GetDefaultLineSize()
    Returns
    Type Description
    System.Double

    The default line size.

    GetDistances(Int32)

    Gets the nested distances, if a line contains a nested lines collection, otherwise null.

    Declaration
    public IDistanceCounterCollection GetDistances(int line)
    Parameters
    Type Name Description
    System.Int32 line

    The line at which the distances is to be obtained.

    Returns
    Type Description
    IDistanceCounterCollection

    The nested distances, if a line contains a nested lines collection, otherwise null.

    GetFooterLineCount()

    Gets the footer line count.

    Declaration
    public int GetFooterLineCount()
    Returns
    Type Description
    System.Int32

    The footer line count.

    GetHeaderLineCount()

    Gets the header line count.

    Declaration
    public int GetHeaderLineCount()
    Returns
    Type Description
    System.Int32

    The header line count.

    GetHidden(Int32, out Int32)

    Gets the boolean value indicating the hidden state for the line with given index.

    Declaration
    public bool GetHidden(int index, out int repeatValueCount)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the line for which the hidden state is to be obtained.

    System.Int32 repeatValueCount

    The number of subsequent lines with same state.

    Returns
    Type Description
    System.Boolean

    The boolean value indicating the hidden state for a line.

    GetLineCount()

    Returns the line count.

    Declaration
    public int GetLineCount()
    Returns
    Type Description
    System.Int32

    The line count.

    GetNestedLines(Int32)

    Gets the nested lines at the given index.

    Declaration
    public IEditableLineSizeHost GetNestedLines(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index at which the nested lines is to be obtained.

    Returns
    Type Description
    IEditableLineSizeHost

    The IEditableLineSizeHost representing the nested lines.

    GetSize(Int32, out Int32)

    Gets the size of the line at the given index.

    Declaration
    public virtual double GetSize(int index, out int repeatValueCount)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the line for which the size is to be obtained.

    System.Int32 repeatValueCount

    The number of subsequent values with same size.

    Returns
    Type Description
    System.Double

    The size of the line at the given index.

    InitializeScrollAxis(ScrollAxisBase)

    Initializes the scroll axis.

    Declaration
    public void InitializeScrollAxis(ScrollAxisBase scrollAxis)
    Parameters
    Type Name Description
    ScrollAxisBase scrollAxis

    The scroll axis.

    InsertLines(Int32, Int32)

    Inserts lines in the collection and raises the LinesInserted event.

    Declaration
    public void InsertLines(int insertAtLine, int count)
    Parameters
    Type Name Description
    System.Int32 insertAtLine

    The index of the first line to insert.

    System.Int32 count

    The count of the lines to be inserted.

    InsertLines(Int32, Int32, IEditableLineSizeHost)

    Insert the given number of lines at the given index.

    Declaration
    public void InsertLines(int insertAtLine, int count, IEditableLineSizeHost movelines)
    Parameters
    Type Name Description
    System.Int32 insertAtLine

    The index of the first line to insert.

    System.Int32 count

    The count of the lines to be inserted.

    IEditableLineSizeHost movelines

    A container with saved state from a preceding InsertLines(Int32, Int32) call when lines should be moved. When it is null, empty lines with default size are inserted.

    remove_DefaultLineSizeChanged(DefaultLineSizeChangedEventHandler)

    Declaration
    public void remove_DefaultLineSizeChanged(DefaultLineSizeChangedEventHandler value)
    Parameters
    Type Name Description
    DefaultLineSizeChangedEventHandler value

    remove_LineHiddenChanged(HiddenRangeChangedEventHandler)

    Declaration
    public void remove_LineHiddenChanged(HiddenRangeChangedEventHandler value)
    Parameters
    Type Name Description
    HiddenRangeChangedEventHandler value

    remove_LinesInserted(LinesInsertedEventHandler)

    Declaration
    public void remove_LinesInserted(LinesInsertedEventHandler value)
    Parameters
    Type Name Description
    LinesInsertedEventHandler value

    remove_LineSizeChanged(RangeChangedEventHandler)

    Declaration
    public void remove_LineSizeChanged(RangeChangedEventHandler value)
    Parameters
    Type Name Description
    RangeChangedEventHandler value

    remove_LinesRemoved(LinesRemovedEventHandler)

    Declaration
    public void remove_LinesRemoved(LinesRemovedEventHandler value)
    Parameters
    Type Name Description
    LinesRemovedEventHandler value

    RemoveLines(Int32, Int32)

    Removes lines from the collection and raises the LinesRemoved event.

    Declaration
    public void RemoveLines(int removeAtLine, int count)
    Parameters
    Type Name Description
    System.Int32 removeAtLine

    The index of the first line to be removed.

    System.Int32 count

    The count of the lines to be removed.

    RemoveLines(Int32, Int32, IEditableLineSizeHost)

    Removes a number of lines at the given index.

    Declaration
    public void RemoveLines(int removeAtLine, int count, IEditableLineSizeHost movelines)
    Parameters
    Type Name Description
    System.Int32 removeAtLine

    The index of the first line to be removed.

    System.Int32 count

    The count of the lines to be removed.

    IEditableLineSizeHost movelines

    A container to save state for a subsequent RemoveLines(Int32, Int32) call when lines should be moved.

    ResetHiddenState()

    Resets the hidden state of the line.

    Declaration
    public void ResetHiddenState()

    ResetLines()

    Reset the lines with default line size.

    Declaration
    public void ResetLines()

    ResetNestedLines()

    Reset the line to become a normal (not nested) line with default line size.

    Declaration
    public void ResetNestedLines()

    ResetNestedLines(Int32)

    Reset the line to become a normal (not nested) line with default line size.

    Declaration
    public void ResetNestedLines(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the line to be reset.

    ResumeUpdates()

    Resumes the update in the view.

    Declaration
    public void ResumeUpdates()

    SetHidden(Int32, Int32, Boolean)

    Sets the hidden state for the given range of lines.

    Declaration
    public void SetHidden(int from, int to, bool hide)
    Parameters
    Type Name Description
    System.Int32 from

    The start index of the line for which the hidden state to be set.

    System.Int32 to

    The end index of the line for which the hidden state to be set.

    System.Boolean hide

    A boolean value indicating whether to hide the lines. If set to true hide the lines.

    SetHiddenInterval(Int32, Int32, Boolean[])

    Initialize the collection with a pattern of hidden lines.

    Declaration
    public void SetHiddenInterval(int start, int lineCount, bool[] values)
    Parameters
    Type Name Description
    System.Int32 start

    The index of the first line where the pattern should be started to be applied.

    System.Int32 lineCount

    The pattern is applied up to until the lineCount given. The last initialized line is at index lineCount-1.

    System.Boolean[] values

    The pattern that is applied repeatedly.

    SetHiddenIntervalWithState(Int32, Int32, Boolean[])

    Initialize the collection with a pattern of hidden lines with state.

    Declaration
    public void SetHiddenIntervalWithState(int start, int lineCount, bool[] values)
    Parameters
    Type Name Description
    System.Int32 start

    The index of the first line where the pattern should be started to be applied.

    System.Int32 lineCount

    The pattern is applied up to until the lineCount given. The last initialized line is at index lineCount-1.

    System.Boolean[] values

    The pattern that is applied repeatedly.

    SetHiddenState(Boolean[])

    Set the hidden state all at once in one operation. Use this method if you want to change the hidden state of many rows at once since this will be much faster instead of individually setting rows hidden.

    Declaration
    public void SetHiddenState(bool[] values)
    Parameters
    Type Name Description
    System.Boolean[] values

    The new hidden state for rows.

    SetNestedLines(Int32, IEditableLineSizeHost)

    Sets the nested lines at the given index.

    Declaration
    public void SetNestedLines(int index, IEditableLineSizeHost nestedLines)
    Parameters
    Type Name Description
    System.Int32 index

    The index at which the nested lines is to be added.

    IEditableLineSizeHost nestedLines

    The nested lines to be added. If parameter is null the line will be converted to a normal (not nested) line with default line size.

    SetRange(Int32, Int32, Double)

    Sets the line size for the range of lines.

    Declaration
    public void SetRange(int from, int to, double size)
    Parameters
    Type Name Description
    System.Int32 from

    The start index of the line for which the line size is to be set.

    System.Int32 to

    The end index of the line for which the line size is to be set.

    System.Double size

    The line size to be set to the given range of lines.

    SuspendUpdates()

    Suspends the updates in the view.

    Declaration
    public void SuspendUpdates()

    Events

    DefaultLineSizeChanged

    Occurs when the default line size changed.

    Declaration
    public event DefaultLineSizeChangedEventHandler DefaultLineSizeChanged
    Event Type
    Type Description
    DefaultLineSizeChangedEventHandler

    FooterLineCountChanged

    Occurs when the footer line count was changed.

    Declaration
    public event EventHandler FooterLineCountChanged
    Event Type
    Type Description
    System.EventHandler

    HeaderLineCountChanged

    Occurs when the header line count was changed.

    Declaration
    public event EventHandler HeaderLineCountChanged
    Event Type
    Type Description
    System.EventHandler

    LineCountChanged

    Occurs when the line count was changed.

    Declaration
    public event EventHandler LineCountChanged
    Event Type
    Type Description
    System.EventHandler

    LineHiddenChanged

    Occurs when a lines hidden state changed.

    Declaration
    public event HiddenRangeChangedEventHandler LineHiddenChanged
    Event Type
    Type Description
    HiddenRangeChangedEventHandler

    LinesInserted

    Occurs when lines were inserted.

    Declaration
    public event LinesInsertedEventHandler LinesInserted
    Event Type
    Type Description
    LinesInsertedEventHandler

    LineSizeChanged

    Occurs when a lines size was changed.

    Declaration
    public event RangeChangedEventHandler LineSizeChanged
    Event Type
    Type Description
    RangeChangedEventHandler

    LinesRemoved

    Occurs when lines were removed.

    Declaration
    public event LinesRemovedEventHandler LinesRemoved
    Event Type
    Type Description
    LinesRemovedEventHandler

    Implements

    IPaddedEditableLineSizeHost
    IEditableLineSizeHost
    ILineSizeHost
    IDistancesHost
    INestedDistancesHost
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved