Inheritance: Element -> NavigableElement -> VisualElement -> View -> InputView Xamarin.Forms documentation: Entry API / Guide

For details on how the control actually works, please refer to the Xamarin.Forms documentation.



Entry(text: string, onTextChanged: string -> ‘msg)

Defines a Entry widget with a text and onTextChanged event.



clearButtonVisibility(value: ClearButtonVisibility)

Sets the clear button visibility. i.e. Never, WhileEditing.

cursorPosition(value: int)

Sets the cursor position.

font(?size: float, ?namedSize: NamedSize, ?attributes: FontAttributes, ?fontFamily: string)

Sets the font family used

horizontalTextAlignment(value: TextAlignment)

Sets the horizontal text alignment.

verticalTextAlignment(value: TextAlignment)

Sets the vertical text alignment.

isPassword(value: bool)

Sets whether the entry is a password.

isTextPredictionEnabled(value: bool)

Sets whether the text prediction is enabled.

returnType(value: ReturnType)

Sets the return type. i.e. Done, Go, Next, Search, Send.

selectionLength(value: int)

Sets the text selection length.

reference(value: ViewRef<Entry>)

Sets a ViewRef instance to retrieve the Xamarin.Forms.Entry instance associated to this widget



onCompleted(onCompleted: ‘msg)

Sets the event handler for the entry onCompleted event

iOS-specific Properties


cursorColor(value: FabColor)

Sets the cursor color.


Entry("Enter an email", TextChanged)
    .textColor(Color.Red.ToFabColor(), Color.Blue.ToFabColor())
    .font(namedSize = NamedSize.Large, fontFamily = "Arial", attributes = FontAttributes.Bold)

Get access to the underlying Xamarin.Forms.Entry

let entryRef = ViewRef<Entry>()

Entry("Enter an email", TexChanged)

Last updated