Migrating from Xamarin TextInputLayout to .NET MAUI TextInputLayout.

21 Jun 20241 minute to read

To migrate easier from Xamarin SfTextInputLayout to .NET MAUI SfTextInputLayout, we kept most of the APIs from Xamarin SfTextInputLayout in MAUI SfTextInputLayout. However, to maintain the consistency of API naming in MAUI SfTextInputLayout, we renamed some of the APIs. The APIs changed in MAUI SfTextInputLayout from Xamarin SfTextInputLayout as detailed in the following:

Namespaces

Xamarin SfTextInputLayout .NET MAUI SfTextInputLayout
Syncfusion.SfTextInputLayout.XForms Syncfusion.Maui.Core

Properties

Xamarin SfTextInputLayout .NET MAUI SfTextInputLayout Description

FocusedStrokeWidth

FocusedStrokeThickness

Gets or sets a value to customize the stroke thickness in a focused state. It is applicable for the bottom line and outline border when setting the container type as filled and outlined, respectively.

UnfocusedStrokeWidth

UnfocusedStrokeThickness

Gets or sets a value to customize the stroke thickness in an unfocused state. It is applicable for the bottom line and outline border when setting the container type as filled and outlined, respectively.

ContainerBackgroundColor

ContainerBackground

Gets or sets the background of the container.

InputView

Content

Gets or sets the value for input view to place behind the hint label.

FocusedColor


UnfocusedColor


ErrorColor

Stroke

Gets or sets the border color or base line color based on container and its states.
Xamarin LabelStyle .NET MAUI LabelStyle Description

Color

TextColor

Gets or sets the text color of the SfTextInputLayout controls label.

Known Issues

Manually input values don’t update the Stroke Value due to an issue at the framework level in .NET 8.0. This problem arises because the manual value doesn’t override an implicit style. However, you can resolve this by setting the Stroke Value using the Visual State Manager (VSM) through Style. Refer to this link for more details.