Xamarin.Forms Guides | Samples

Xamarin.Forms.TextCell Class

A Cell with primary TextCell.Text and TextCell.Detail text.

See Also: TextCell

Syntax

public class TextCell : Cell

Remarks

The following example shows a basic use.

C# Example

public class App : Application
{
    public App()
    {
        MainPage = new ContentPage {
            Content = new TableView {
                Intent = TableIntent.Form,
                Root = new TableRoot ("Table Title") {
                    new TableSection ("Section 1 Title") {
                        new TextCell {
                            Text = "TextCell Text",
                            Detail = "TextCell Detail"
                        },
                        new EntryCell {
                            Label = "EntryCell:",
                            Placeholder = "default keyboard",
                            Keyboard = Keyboard.Default
                        }
                    },
                    new TableSection ("Section 2 Title") {
                        new EntryCell {
                            Label = "Another EntryCell:",
                            Placeholder = "phone keyboard",
                            Keyboard = Keyboard.Telephone
                        },
                        new SwitchCell {
                            Text = "SwitchCell:"
                        }
                    }
                }
            }
        }; 
    }
    // OnStart, OnSleep, OnResume overrides omitted...
}

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.TextCell are listed below.

See Also: Cell

Public Constructors

Initializes a new instance of the TextCell class.

Public Fields

static readonly
CommandParameterPropertyBindableProperty. Identifies the CommandParameter bindable property.
static readonly
CommandPropertyBindableProperty. Identifies the Command bindable property.
static readonly
DetailColorPropertyBindableProperty. Identifies the DetailColor bindable property.
static readonly
DetailPropertyBindableProperty. Gets or sets the secondary text to be displayed. This is a bindable property.
static readonly
TextColorPropertyBindableProperty. Identifies the TextColor bindable property.
static readonly
TextPropertyBindableProperty. Identifies the Text bindable property.

Public Properties

CommandICommand. Gets or sets the ICommand to be executed when the TextCell is tapped. This is a bindable property.
CommandParameterObject. Gets or sets the parameter passed when invoking the Command. This is a bindable property.
DetailString. Gets or sets the secondary text to be displayed in the TextCell. This is a bindable property.
DetailColorColor. Gets or sets the color to render the secondary text. This is a bindable property.
TextString. Gets or sets the primary text to be displayed. This is a bindable property.
TextColorColor. Gets or sets the color to render the primary text. This is a bindable property.

Protected Methods

override
OnTapped()
Invoked whenever the Cell is Tapped.