Class VisualContainer
A scrollable visual container that holds the item elements. Handles the arrange and measure logics of all elements.
Inheritance
Implements
Namespace: Syncfusion.ListView.XForms
Assembly: Syncfusion.SfListView.XForms.dll
Syntax
public class VisualContainer : Layout<View>, IDisposable
  Constructors
VisualContainer()
Initializes a new instance of the VisualContainer class.
Declaration
public VisualContainer()
  Properties
ScrollRows
Gets a reference to the ScrollAxisBase instance which contains the information of row lines.
Declaration
public ScrollAxisBase ScrollRows { get; }
  Property Value
| Type | 
|---|
| ScrollAxisBase | 
Methods
CreateScrollAxis(Boolean, IScrollBar, ILineSizeHost)
Creates a new instance of ScrollAxisBase.
Declaration
protected virtual ScrollAxisBase CreateScrollAxis(bool pixelScroll, IScrollBar scrollBar, ILineSizeHost lineSizes)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | pixelScroll | A boolean value denoting pixel or line scrolling.  | 
      
| IScrollBar | scrollBar | The scroll bar.  | 
      
| ILineSizeHost | lineSizes | The line sizes.  | 
      
Returns
| Type | Description | 
|---|---|
| ScrollAxisBase | Returns the ScrollAxisBase.  | 
      
Dispose()
Disposes all allocated resources.
Declaration
public void Dispose()
  Dispose(Boolean)
Dispose the instances, if parameter is true.
Declaration
protected virtual void Dispose(bool disposing)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | disposing | Represents the boolean value for disposing objects.  | 
      
LayoutChildren(Double, Double, Double, Double)
Positions and sizes the children of 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.  | 
      
OnMeasure(Double, Double)
Gets 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.  | 
      
OnSizeAllocated(Double, Double)
Allocates the size of item elements.
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 or not.
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 or not.
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.  |