menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridLayout - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridLayout

    Arrange the items in a Grid structure with the specified number of columns. It supports both vertical and horizontal orientation.

    Inheritance
    System.Object
    LayoutBase
    GridLayout
    Inherited Members
    LayoutBase.ItemsCacheLimit
    LayoutBase.ScrollToRowIndex(Int32, Boolean)
    LayoutBase.ScrollToRowIndex(Int32, ScrollToPosition, Boolean)
    Namespace: Syncfusion.ListView.XForms
    Assembly: Syncfusion.SfListView.XForms.dll
    Syntax
    public class GridLayout : LayoutBase
    Remarks

    It supports all functionalities (E.g., Grouping, Sorting, Filtering, Swiping, Real-time updates, etc.) like LinearLayout.

    Constructors

    GridLayout()

    Initializes a new instance of the GridLayout class.

    Declaration
    public GridLayout()

    Fields

    SpanCountProperty

    Identifies the SpanCount bindable property.

    Declaration
    public static readonly BindableProperty SpanCountProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty
    Remarks

    This bindable property is read-only.

    Properties

    SpanCount

    Gets or sets the span count for GridLayout. That is, number of items to be displayed in a row. For horizontal orientation, it specifies the number of items in a column.

    Declaration
    public int SpanCount { get; set; }
    Property Value
    Type
    System.Int32
    Examples
    SfListView listView = new SfListView();
    listView.LayoutManager = new GridLayout() { SpanCount = 2 };
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved