Xamarin.Forms Guides | Samples

Xamarin.Forms.TableSectionBase<T> Class

Table section that contains instances of type T that are rendered by Xamarin.Forms.

See Also: TableSectionBase<T> Members

Syntax

public abstract class TableSectionBase<T> : TableSectionBase, ICollection<T>, IEnumerable<T>, IList<T>, INotifyCollectionChanged
where T : BindableObject

Type Parameters

T

Remarks

Sections are used to group cells in the screen and they are the only valid direct child of the TableRoot. Sections can contain any of the standard Cells, including new TableRoots.

TableRoots embedded in a section are used to navigate to a new deeper level.

You can assign a header and a footer either as strings (Header and Footer) properties, or as Views to be shown (HeaderView and FooterView). Internally this uses the same storage, so you can only show one or the other.

Subtypes of TableSectionBase`1 are TableSection and TableRoot, as shown in the following diagram:

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

The members of Xamarin.Forms.TableSectionBase<T> are listed below.

See Also: TableSectionBase

Protected Constructors

Constructs a new TableSection`1 instance with an empty title.
Constructs a new TableSection`1 instance with the specified title.

Public Properties

[read-only]
CountInt32. Gets the number of items in this TableSectionBase`1 object.
default property
Item(Int32)T. Returns the item that is stored at the location in this TableSectionBase`1 object that is specified by index.

Public Methods

Add(IEnumerable<T>)
Adds a list of items to this TableSectionBase`1 object.
Add(T)
Adds an item to this TableSectionBase`1 object.
Clear()
Removes all items in this TableSectionBase`1.
Contains(T) : Boolean
Returns a Boolean value that indicates whether or not this TableSectionBase`1 has a reference to a particular object.
CopyTo(T[], Int32)
Copies the elements of the current collection to an Array, starting at the specified index.
GetEnumerator() : IEnumerator<T>
Returns an enumerator that iterates through the items in this TableSectionBase`1 object.
IndexOf(T) : Int32
Returns the index of the first occurrence of item in this TableSectionBase`1 object.
Insert(Int32, T)
Inserts an item into this TableSectionBase`1 object at the specified position.
Remove(T) : Boolean
Removes a specified item from this TableSectionBase`1 object.
RemoveAt(Int32)
Removes a specified item from this TableSectionBase`1 object at the position that is specified by index.

Protected Methods

override
OnBindingContextChanged()
Calls the BindableObject.SetInheritedBindingContext method, passing the new binding context, on each of the items in this TableSectionBase`1 object.

Public Events

CollectionChangedEvent that is raised when one or more items is added to or removed from this TableSectionBase`1 object.

Explicitly Implemented Interface Members

IEnumerable.GetEnumeratorReturns an enumerator that iterates through the collection of objects in this TableSectionBase`1 object.
[read-only]
ICollection<T>.IsReadOnlyBoolean. Returns false; The collection of objects in this can be changed.