Class ListViewItem
Represents the item of data in the SfListView control.
Namespace: Syncfusion.ListView.XForms
Assembly: Syncfusion.SfListView.XForms.dll
Syntax
public class ListViewItem : ContentView, IVisibility, IDisposable
Constructors
ListViewItem()
Initializes a new instance of the ListViewItem class.
Declaration
public ListViewItem()
ListViewItem(ItemType)
Initializes a new instance of the ListViewItem class based on ItemType.
Declaration
public ListViewItem(ItemType itemType)
Parameters
Type | Name | Description |
---|---|---|
ItemType | itemType | Indicates the type of the item. |
Properties
Clip
Gets the clip rectangle of the element. Clips the item when layout with SwipeView in GridLayout.
Declaration
public Rectangle Clip { get; }
Property Value
Type |
---|
Xamarin.Forms.Rectangle |
IsSelected
Gets or sets a value indicating whether an item is selected or not.
Declaration
public bool IsSelected { get; set; }
Property Value
Type |
---|
System.Boolean |
Visibility
Gets or sets a value indicating whether the visibility of an item is true or not.
Declaration
public bool Visibility { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
Dispose()
Disposes all allocated resources.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes the instances, if the parameter is set to true.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Represents the boolean value for disposing objects. |
OnChildAdded(Element)
Override method indicates when child element is added into the list view item.
Declaration
protected override void OnChildAdded(Element child)
Parameters
Type | Name | Description |
---|---|---|
Xamarin.Forms.Element | child | Represent the child element of list view item to be added. |
OnChildMeasureInvalidated()
Method raises when the content size is changed at runtime.
Declaration
protected override void OnChildMeasureInvalidated()
OnItemAppearing()
Customizes the behavior when overridden if the ListViewItem comes into the view.
Declaration
protected virtual void OnItemAppearing()
ShouldInvalidateOnChildAdded(View)
Override method to determine whether to invalidate on child added or not.
Declaration
protected override bool ShouldInvalidateOnChildAdded(View child)
Parameters
Type | Name | Description |
---|---|---|
Xamarin.Forms.View | child | Represents the View which is to be added. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the boolean value accordingly. |
ShouldInvalidateOnChildRemoved(View)
Override method to determine whether to invalidate on child removed or not.
Declaration
protected override bool ShouldInvalidateOnChildRemoved(View child)
Parameters
Type | Name | Description |
---|---|---|
Xamarin.Forms.View | child | Represents the View which is to be removed. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the boolean value accordingly. |