TextCell Class

Definition

A Cell with primary Text and Detail text.

public class TextCell : Xamarin.Forms.Cell
type TextCell = class
    inherit Cell
Inheritance
System.Object
TextCell
Derived

Remarks

The following example shows a basic use.

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...
}

Constructors

TextCell()

Initializes a new instance of the TextCell class.

Fields

CommandParameterProperty

Identifies the CommandParameter bindable property.

CommandProperty

Identifies the Command bindable property.

DefaultCellHeight

The default height of cells.

(Inherited from Cell)
DetailColorProperty

Identifies the DetailColor bindable property.

DetailProperty

Gets or sets the secondary text to be displayed. This is a bindable property.

TextColorProperty

Identifies the TextColor bindable property.

TextProperty

Identifies the Text bindable property.

Properties

AutomationId

Gets or sets a value that allows the automation framework to find and interact with this element.

(Inherited from Element)
BindingContext

Gets or sets object that contains the properties that will be targeted by the bound properties that belong to this BindableObject.

(Inherited from BindableObject)
ClassId

Gets or sets a value used to identify a collection of semantically similar elements.

(Inherited from Element)
Command

Gets or sets the ICommand to be executed when the TextCell is tapped. This is a bindable property.

CommandParameter

Gets or sets the parameter passed when invoking the Command. This is a bindable property.

ContextActions

Gets a list of menu items to display when the user performs the device-specific context gesture on the Cell.

(Inherited from Cell)
Detail

Gets or sets the secondary text to be displayed in the TextCell. This is a bindable property.

DetailColor

Gets or sets the color to render the secondary text. This is a bindable property.

Dispatcher (Inherited from BindableObject)
EffectControlProvider

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
Effects

A list of the effects that are applied to this item.

(Inherited from Element)
HasContextActions

Gets a value that indicates whether the cell has at least one menu item in its ContextActions list property.

(Inherited from Cell)
Height

Gets or sets the height of the Cell.

(Inherited from Cell)
Id

Gets a value that can be used to uniquely identify an element through the run of an application.

(Inherited from Element)
IsContextActionsLegacyModeEnabled (Inherited from Cell)
IsEnabled

Gets or sets the IsEnabled state of the Cell. This is a bindable property.

(Inherited from Cell)
LogicalChildren

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
Parent

Gets or sets the parent element of the element.

(Inherited from Element)
ParentView
Obsolete.

Gets the element which is the closest ancestor of this element that is a VisualElement.

(Inherited from Element)
Platform
Obsolete.
(Inherited from Element)
RealParent

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
RenderHeight

Gets the height of the rendered cell on the device.

(Inherited from Cell)
StyleId

Gets or sets a user defined value to uniquely identify the element.

(Inherited from Element)
Text

Gets or sets the primary text to be displayed. This is a bindable property.

TextColor

Gets or sets the color to render the primary text. This is a bindable property.

Methods

ApplyBindings()

Apply the bindings to BindingContext.

(Inherited from BindableObject)
ClearValue(BindableProperty)

Clears any value set by SetValue for property.

(Inherited from BindableObject)
ClearValue(BindablePropertyKey)

Clears any value set by SetValue for the property that is identified by propertyKey.

(Inherited from BindableObject)
CoerceValue(BindableProperty) (Inherited from BindableObject)
CoerceValue(BindablePropertyKey) (Inherited from BindableObject)
Descendants()

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
EffectIsAttached(String)

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
FindByName(String)

Returns the element that has the specified name.

(Inherited from Element)
ForceUpdateSize()

Immediately updates the cell's size.

(Inherited from Cell)
GetValue(BindableProperty)

Returns the value that is contained in the BindableProperty.

(Inherited from BindableObject)
GetValues(BindableProperty, BindableProperty, BindableProperty)
Obsolete.

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
GetValues(BindableProperty, BindableProperty)
Obsolete.

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
IsSet(BindableProperty)

Returns true if the target property exists and has been set.

(Inherited from BindableObject)
On<T>() (Inherited from Cell)
OnAppearing()

Invoked whenever an Appearing event occurs. Implement this method to add class handling for this event.

(Inherited from Cell)
OnBindingContextChanged()

Event that is raised when the binding context is changed.

(Inherited from Cell)
OnChildAdded(Element)

Invoked whenever the ChildAdded event needs to be emitted. Implement this method to add class handling for this event.

(Inherited from Element)
OnChildRemoved(Element, Int32) (Inherited from Element)
OnChildRemoved(Element)
Obsolete.

Invoked whenever the ChildRemoved event needs to be emitted. Implement this method to add class handling for this event.

(Inherited from Element)
OnDisappearing()

Invoked whenever an Disappearing event occurs. Implement this method to add class handling for this event.

(Inherited from Cell)
OnParentSet()

Application developers can override this method to do actions when the cell's parent is set.

(Inherited from Cell)
OnPropertyChanged(String)

Method that is called when a bound property is changed.

(Inherited from Element)
OnPropertyChanging(String)

TApplication developers can override this method to do actions when the property named by propertyName is set.

(Inherited from Cell)
OnTapped()

Invoked whenever the Cell is Tapped.

RemoveBinding(BindableProperty)

Removes a previously set binding.

(Inherited from BindableObject)
RemoveDynamicResource(BindableProperty)

Removes a previously set dynamic resource

(Inherited from Element)
SendAppearing()

For internal use by the Xamarin.Forms platform.

(Inherited from Cell)
SendDisappearing()

For internal use by the Xamarin.Forms platform.

(Inherited from Cell)
SetBinding(BindableProperty, BindingBase)

Assigns a binding to a property.

(Inherited from BindableObject)
SetDynamicResource(BindableProperty, String)

Sets the BindableProperty property of this element to be updated via the DynamicResource with the provided key.

(Inherited from Element)
SetValue(BindableProperty, Object)

Sets the value of the specified property.

(Inherited from BindableObject)
SetValue(BindablePropertyKey, Object)

Sets the value of the propertyKey.

(Inherited from BindableObject)
SetValueCore(BindableProperty, Object, SetValueFlags)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
SetValueFromRenderer(BindableProperty, Object)

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
SetValueFromRenderer(BindablePropertyKey, Object)

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
UnapplyBindings()

Unapplies all previously set bindings.

(Inherited from BindableObject)

Events

Appearing

Occurs when the visual representation of the Cell is being added to the visual layout.

(Inherited from Cell)
BindingContextChanged

Raised whenever the BindingContext property changes.

(Inherited from BindableObject)
ChildAdded

Occurs whenever a child element is added to the element.

(Inherited from Element)
ChildRemoved

Occurs whenever a child element is removed from the element.

(Inherited from Element)
DescendantAdded

Occurs whenever a child element is added to the elements subtree.

(Inherited from Element)
DescendantRemoved

Occurs whenever a child element is removed from the elements subtree.

(Inherited from Element)
Disappearing

Occurs when the visual representation of the Cell is being removed from the visual layout.

(Inherited from Cell)
ForceUpdateSizeRequested

For internal use by the Xamarin.Forms platform.

(Inherited from Cell)
PlatformSet
Obsolete.
(Inherited from Element)
PropertyChanged

Raised when a property has changed.

(Inherited from BindableObject)
PropertyChanging

Raised when a property is about to change.

(Inherited from BindableObject)
Tapped

Occurs when the Cell is Tapped.

(Inherited from Cell)

Explicit Interface Implementations

IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
IElementController.SetValueFromRenderer(BindableProperty, Object)

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
INameScope.RegisterName(String, Object)

For internal use only.

(Inherited from Element)

Extension Methods

GetPropertyIfSet<T>(BindableObject, BindableProperty, T)
SetAppThemeColor(BindableObject, BindableProperty, Color, Color)
SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String)

Creates and applies a binding to a property.

SetBinding<TSource>(BindableObject, BindableProperty, Expression<Func<TSource,Object>>, BindingMode, IValueConverter, String)
Obsolete.

Creates and applies a binding from an expression.

SetOnAppTheme<T>(BindableObject, BindableProperty, T, T)
GetPath(Cell)

For internal use by platform renderers.

FindByName<T>(Element, String)

Returns the instance of type T that has name name in the scope that includes element.

Applies to