Maui Android SfTextInputLayout errorMessage not working since version 25.1....

HI

In a .net Maui project, tested in Android, SfTextInputLayout error message is not working since versin 25.1-... The color of border and message does not change.


Thank you

Helder



3 Replies

AJ AhamedAliNishad JahirHussain Syncfusion Team April 9, 2024 02:27 PM UTC

Hi Helder,


Query 1 : SfTextInputLayout error message is not working since version 25.1-


We have reviewed your query, and based on the provided information, we have created a sample using the latest NuGet version 25.1.39. However, we were not able to reproduce the reported issue. The error message is shown as expected in SfTextInputLayout. We have attached the tested sample for your reference


To better replicate the reported issue and assist with resolving the issue, it would be helpful if you could provide more detailed information about the scenario in which our control was used, including a sample demonstrating the issue with replication steps. Please let us know if you have any other queries.


Kindly review the attached example and apply any required modifications to reproduce the problem. Afterward, kindly forward the sample to us, as it would enable us to conduct a more thorough investigation of the issue.


Query 2 : The color of border does not change.


Due to the inclusion of theme support in the Volume 1 main release, the color of the border does not change automatically based on the error text color. To achieve the border color changing the same as the error text color, we suggest utilizing the Visual State Manager (VSM) as demonstrated in the code snippet below. This works fine as expected. We have attached the sample for your reference. Please review it and let us know if you need further details


Code Snippet :


    <ContentPage.Resources>

        <Style TargetType="inputLayout:SfTextInputLayout" >

            <Setter Property="VisualStateManager.VisualStateGroups">

                <Setter.Value>

                    <VisualStateGroupList>

                        <VisualStateGroup x:Name="CommonStates">

                            <VisualState x:Name="Normal">

                                <VisualState.Setters>

                                    <Setter Property="Stroke" Value="Green"/>

 

                                </VisualState.Setters>

                            </VisualState>

                            <VisualState x:Name="Error">

                                <VisualState.Setters>

                                    <Setter Property="Stroke" Value="Red"/>

                                   

                                </VisualState.Setters>

                            </VisualState>

                        </VisualStateGroup>

                    </VisualStateGroupList>

 

                </Setter.Value>

            </Setter>

            <Setter Property="ErrorLabelStyle">

                <Setter.Value>

                    <inputLayout:LabelStyle TextColor="Red"/>

                </Setter.Value>

            </Setter>

        </Style>

    </ContentPage.Resources>

 

    <ContentPage.BindingContext>

        <local:ViewModel x:Name="VM"/>

    </ContentPage.BindingContext>

 

  

    <StackLayout VerticalOptions="Center" HorizontalOptions="Center">

        <inputLayout:SfTextInputLayout Hint="{Binding Hint}"

                                       ContainerType="None"

                                       ReserveSpaceForAssistiveLabels="true"

                                       HasError="{Binding HasError}"

                                       ErrorText="{Binding ErrorText}"

                                       x:Name="TIL" >

            <Entry x:Name="entry"  TextChanged="Entry_TextChanged"/>

        </inputLayout:SfTextInputLayout>

 

      

 

    </StackLayout>

              

 

</ContentPage>


Regards,

Ahamed Ali Nishad.


Attachment: TextInputlayoutMaui_(4)_9ebb243f.zip


HE Helder April 12, 2024 11:11 AM UTC

Hi  Ahamed,


with the giving code it's working.


Thank you.


Regards,

Helder



PR Preethi Rajakandham Syncfusion Team April 15, 2024 05:17 AM UTC

Hi Helder,

You're welcome. We are glad to know that the reported problem has been resolved. Also, please let us know if you need further assistance on this. As always, we will be happy to assist you.

Regards,

Preethi R


Loader.
Up arrow icon