How to Customize the thickness of stroke?

8 Jan 20251 minute to read

Customize the thickness of stroke

The stroke width (for Outlined) and line thickness (for Filled and None) can be customized based on the focus state of the input view by setting the FocusedStrokeThickness and UnfocusedStrokeThickness properties.

<inputLayout:SfTextInputLayout  Hint="Name" 
                                ContainerType="Outlined"
                                FocusedStrokeThickness="4"
                                UnfocusedStrokeThickness="2">
    <Entry />
</inputLayout:SfTextInputLayout>
var inputLayout = new SfTextInputLayout();
inputLayout.Hint = "Name";
inputLayout.ContainerType = ContainerType.Outlined;
inputLayout.FocusedStrokeThickness = 4;
inputLayout.UnfocusedStrokeThickness = 2;
inputLayout.InputView = new Entry();

Stoke thickness of .NET MAUI TextInputLayout.