menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class VisualContainer

    Represents a container that holds the row elements in a SfDataGrid control.

    Inheritance
    System.Object
    VisualContainer
    Implements
    System.IDisposable
    Namespace: Syncfusion.SfDataGrid.XForms
    Assembly: Syncfusion.SfDataGrid.XForms.dll
    Syntax
    public class VisualContainer : Layout<View>, IDisposable

    Constructors

    VisualContainer()

    Initializes a new instance of the VisualContainer class.

    Declaration
    public VisualContainer()

    Fields

    HorizontalOffsetProperty

    Identifies the HorizontalOffset Xamarin.Forms.BindableProperty.

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

    This Xamarin.Forms.BindableProperty is read-only.

    VerticalOffsetProperty

    Identifies the VerticalOffset Xamarin.Forms.BindableProperty.

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

    This Xamarin.Forms.BindableProperty is read-only.

    Properties

    AndroidScrollOwner

    Gets a reference to the Syncfusion.SfDataGrid.XForms.AndroidScrollView instance.

    Declaration
    public AndroidScrollView AndroidScrollOwner { get; }
    Property Value
    Type Description
    Syncfusion.SfDataGrid.XForms.AndroidScrollView

    A reference to the Syncfusion.SfDataGrid.XForms.AndroidScrollView instance.

    ColumnCount

    Gets or sets the column count in the SfDataGrid control.

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

    The column count in the SfDataGrid control.

    ColumnWidths

    Gets the columns width from the LineSizeCollection.

    Declaration
    public IPaddedEditableLineSizeHost ColumnWidths { get; }
    Property Value
    Type Description
    IPaddedEditableLineSizeHost

    The columns width from the LineSizeCollection.

    ExtentHeight

    Gets the extent height of a SfDataGrid control.

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

    The extent height of a SfDataGrid control.

    ExtentWidth

    Gets the extent width of a SfDataGrid control.

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

    The extent width of a SfDataGrid control.

    FrozenColumns

    Gets or sets the frozen columns count to freeze the columns at the left, next to RowHeader if ShowRowHeader is true.

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

    The frozen columns count to freeze the columns at the left, next to RowHeader if ShowRowHeader is true.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Negative values are not allowed.

    FrozenRows

    Gets or sets the frozen rows count to freeze the rows at the top below header.

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

    The frozen rows count to freeze the rows at the top below header.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Negative values are not allowed.

    HorizontalOffset

    Gets or sets the horizontal offset of a SfDataGrid control.

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

    The horizontal offset of a SfDataGrid control.

    HScrollBar

    Gets a reference to the class that implements IScrollBar which contains the horizontal scroll bar information.

    Declaration
    public IScrollBar HScrollBar { get; }
    Property Value
    Type Description
    IScrollBar

    A reference to the class that implements IScrollBar which contains the horizontal scroll bar information.

    IsChildInSwipe

    Gets or sets a value indicating whether any child is in swipe.

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

    A boolean value indicating whether any child is in swipe.

    NeedToRefreshColumn

    Gets or sets a value indicating whether to refresh the columns.

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

    A boolean value denoting whether to refresh the columns.

    RefreshView

    Gets or sets a reference to the PullToRefreshView instance.

    Declaration
    public PullToRefreshView RefreshView { get; set; }
    Property Value
    Type Description
    PullToRefreshView

    A reference to the PullToRefreshView instance.

    RowCount

    Gets or sets the row count in the SfDataGrid control.

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

    The row count in the SfDataGrid control.

    RowGenerator

    Gets a reference to the class that implements IRowGenerator.

    Declaration
    public IRowGenerator RowGenerator { get; }
    Property Value
    Type Description
    IRowGenerator

    A reference to the class that implements IRowGenerator.

    RowHeightManager

    Gets or sets a reference to the RowHeightManager instance that manages the row heights in a SfDataGrid control.

    Declaration
    public RowHeightManager RowHeightManager { get; set; }
    Property Value
    Type Description
    Syncfusion.SfDataGrid.XForms.RowHeightManager

    A reference to the RowHeightManager instance that manages the row heights in a SfDataGrid control.

    RowHeights

    Gets the rows height from the LineSizeCollection.

    Declaration
    public IPaddedEditableLineSizeHost RowHeights { get; }
    Property Value
    Type Description
    IPaddedEditableLineSizeHost

    The rows height from the LineSizeCollection.

    RowsGenerator

    Gets a reference to the class that implements IRowGenerator.

    Declaration
    public IRowGenerator RowsGenerator { get; }
    Property Value
    Type
    IRowGenerator

    ScrollColumns

    Gets a reference to the ScrollAxisBase instance which contains the information of column lines in a SfDataGrid control.

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

    A reference to the ScrollAxisBase instance which contains the information of column lines in a SfDataGrid control.

    ScrollerHeight

    Gets the height of the ScrollView in a SfDataGrid control.

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

    The height of the ScrollView in a SfDataGrid control.

    ScrollOwner

    Gets a reference to the Syncfusion.SfDataGrid.XForms.ExtendedScrollView instance.

    Declaration
    public ExtendedScrollView ScrollOwner { get; }
    Property Value
    Type Description
    Syncfusion.SfDataGrid.XForms.ExtendedScrollView

    A reference to the Syncfusion.SfDataGrid.XForms.ExtendedScrollView instance.

    ScrollRows

    Gets a reference to the ScrollAxisBase instance which contains the information of row lines in a SfDataGrid control.

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

    A reference to the ScrollAxisBase instance which contains the information of row lines in a SfDataGrid control.

    VerticalOffset

    Gets or sets the vertical offset of a SfDataGrid control.

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

    The vertical offset of a SfDataGrid control.

    VScrollBar

    Gets a reference to the class that implements IScrollBar which contains the vertical scroll bar information.

    Declaration
    public IScrollBar VScrollBar { get; }
    Property Value
    Type Description
    IScrollBar

    A reference to the class that implements IScrollBar which contains the vertical scroll bar information.

    Methods

    Dispose()

    Releases the resources used by the component.

    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.

    InvalidateMeasure()

    Method that is called to invalidate the layout of this Xamarin.Forms.VisualElement. Raises the Xamarin.Forms.VisualElement.MeasureInvalidated event.

    Declaration
    protected override void InvalidateMeasure()

    LayoutChildren(Double, Double, Double, Double)

    Positions and sizes the children of the VisualContainer.

    Declaration
    protected override void LayoutChildren(double x, double y, double width, double height)
    Parameters
    Type Name Description
    System.Double x

    A value that represents the x coordinate of the child.

    System.Double y

    A value that represents the y coordinate of the child.

    System.Double width

    A value that represents the width of the child.

    System.Double height

    A value that represents the height of the child.

    OnChildMeasureInvalidated()

    Invoked whenever a child of the layout has emitted Xamarin.Forms.VisualElement.MeasureInvalidated.

    Declaration
    protected override void OnChildMeasureInvalidated()

    OnCreateColumnWidths()

    Creates a new instance of LineSizeCollection for getting the column widths.

    Declaration
    protected IPaddedEditableLineSizeHost OnCreateColumnWidths()
    Returns
    Type Description
    IPaddedEditableLineSizeHost

    A new instance of the LineSizeCollection.

    OnCreateRowHeights()

    Creates a new instance of LineSizeCollection for getting the row heights.

    Declaration
    protected IPaddedEditableLineSizeHost OnCreateRowHeights()
    Returns
    Type Description
    IPaddedEditableLineSizeHost

    A new instance of the LineSizeCollection.

    OnMeasure(Double, Double)

    This method is called during the measure pass of a layout cycle to get the desired size of an element.

    Declaration
    protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
    Parameters
    Type Name Description
    System.Double widthConstraint

    The available width for the element to use.

    System.Double heightConstraint

    The available height for the element to use.

    Returns
    Type Description
    Xamarin.Forms.SizeRequest

    A Xamarin.Forms.SizeRequest which contains the desired size of the element.

    Remarks

    The results of this method will be (-1, -1) if the element has not yet been realized with a platform specific backing control. Overriding this method does not require a call to the base class so long as a valid SizeRequest is returned.

    OnSizeAllocated(Double, Double)

    This method is called when the size of the element is set during a layout cycle. This method is called directly before the Xamarin.Forms.VisualElement.SizeChanged event is emitted.

    Declaration
    protected override void OnSizeAllocated(double width, double height)
    Parameters
    Type Name Description
    System.Double width

    The new width of the element.

    System.Double height

    The new height of the element.

    ShouldInvalidateOnChildAdded(View)

    Method to decide whether to call Xamarin.Forms.VisualElement.InvalidateMeasure when adding a child.

    Declaration
    protected override bool ShouldInvalidateOnChildAdded(View child)
    Parameters
    Type Name Description
    Xamarin.Forms.View child

    The Content of the VisualContainer.

    Returns
    Type Description
    System.Boolean

    A boolean value do decide whether to invalidate when adding a child.

    ShouldInvalidateOnChildRemoved(View)

    Method to decide whether to call Xamarin.Forms.VisualElement.InvalidateMeasure when removing a child.

    Declaration
    protected override bool ShouldInvalidateOnChildRemoved(View child)
    Parameters
    Type Name Description
    Xamarin.Forms.View child

    The Content of the VisualContainer.

    Returns
    Type Description
    System.Boolean

    A boolean value do decide whether to invalidate when removing a child.

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved