menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class LineSizeCollection - WPF API Reference | Syncfusion

    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
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.UI.Xaml.Grid.ScrollAxis
    Assembly: Syncfusion.SfGridCommon.WPF.dll
    Syntax
    public class LineSizeCollection : IPaddedEditableLineSizeHost, IEditableLineSizeHost, ILineSizeHost, IDistancesHost, INestedDistancesHost, IDisposable

    Constructors

    LineSizeCollection()

    Declaration
    public LineSizeCollection()

    Fields

    Empty

    Returns an empty collection.

    Declaration
    public static readonly LineSizeCollection Empty
    Field Value
    Type
    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 or sets the distances.

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

    The distances.

    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
    Property Value
    Type
    System.Double

    LineCount

    Gets or sets the line count.

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

    The line count.

    PaddingDistance

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

    SupportsInsertRemove

    Gets whether the host supports inserting and removing lines.

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

    SupportsNestedLines

    Gets whether the host supports nesting.

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

    TotalExtent

    Gets the total extent which is the total of all line sizes. Note: This propert only works if the DistanceCollection has been setup for pixel scrolling; otherwise it returns double.NaN.

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

    The total extent or double.NaN.

    Methods

    CreateMoveLines()

    Creates the object which holds temporary state when moving lines.

    Declaration
    public IEditableLineSizeHost CreateMoveLines()
    Returns
    Type
    IEditableLineSizeHost

    DeferRefresh()

    Declaration
    public IDisposable DeferRefresh()
    Returns
    Type
    System.IDisposable

    Dispose()

    Declaration
    public void Dispose()

    Dispose(Boolean)

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

    GetDefaultLineSize()

    Returns the default line size.

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

    GetDistances(Int32)

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

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

    The line.

    Returns
    Type
    IDistanceCounterCollection

    GetFooterLineCount()

    Gets the footer line count.

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

    GetHeaderLineCount()

    Gets the header line count.

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

    GetHidden(Int32, out Int32)

    Gets the hidden state for a line.

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

    The index.

    System.Int32 repeatValueCount

    The number of subsequent lines with same state.

    Returns
    Type
    System.Boolean

    GetLineCount()

    Returns the line count.

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

    GetNestedLines(Int32)

    Gets the nested lines.

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

    The index.

    Returns
    Type
    IEditableLineSizeHost

    GetSize(Int32, out Int32)

    Gets the size.

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

    The index.

    System.Int32 repeatValueCount

    The number of subsequent values with same size.

    Returns
    Type
    System.Double

    InitializeScrollAxis(ScrollAxisBase)

    Initializes the scroll axis.

    Declaration
    public virtual 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.

    InsertLines(Int32, Int32, IEditableLineSizeHost)

    Inserts lines in the collection and raises the LinesInserted event.

    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.

    IEditableLineSizeHost movelines

    A container with saved state from a preceeding call when lines should be moved. When it is null empty lines with default size are inserted.

    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.

    RemoveLines(Int32, Int32, IEditableLineSizeHost)

    Removes lines from the collection and raises the LinesRemoved event.

    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.

    IEditableLineSizeHost movelines

    A container to save state for a subsequent call when lines should be moved.

    ResetHiddenState()

    Declaration
    public void ResetHiddenState()

    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.

    ResumeUpdates()

    Declaration
    public void ResumeUpdates()

    SetHidden(Int32, Int32, Boolean)

    Sets the hidden state for a range of lines.

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

    From.

    System.Int32 to

    To.

    System.Boolean hide

    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[])

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

    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.

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

    The index.

    IEditableLineSizeHost nestedLines

    The nested lines. 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 a range.

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

    From.

    System.Int32 to

    To.

    System.Double size

    The size.

    SuspendUpdates()

    Declaration
    public void SuspendUpdates()

    Events

    DefaultLineSizeChanged

    Occurs when the default line size changed.

    Declaration
    public virtual event DefaultLineSizeChangedEventHandler DefaultLineSizeChanged
    Event Type
    Type
    DefaultLineSizeChangedEventHandler

    FooterLineCountChanged

    Occurs when the footer line count was changed.

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

    HeaderLineCountChanged

    Occurs when the header line count was changed.

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

    LineCountChanged

    Occurs when the line count was changed.

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

    LineHiddenChanged

    Occurs when a lines hidden state changed.

    Declaration
    public virtual event HiddenRangeChangedEventHandler LineHiddenChanged
    Event Type
    Type
    HiddenRangeChangedEventHandler

    LinesInserted

    Occurs when lines were inserted.

    Declaration
    public virtual event LinesInsertedEventHandler LinesInserted
    Event Type
    Type
    LinesInsertedEventHandler

    LineSizeChanged

    Occurs when a lines size was changed.

    Declaration
    public virtual event RangeChangedEventHandler LineSizeChanged
    Event Type
    Type
    RangeChangedEventHandler

    LinesRemoved

    Occurs when lines were removed.

    Declaration
    public virtual event LinesRemovedEventHandler LinesRemoved
    Event Type
    Type
    LinesRemovedEventHandler

    Implements

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