Entry wont fit inside inputLayout:SfTextInputLayout

 My code:

<inputLayout:SfTextInputLayout

                    TrailingViewPosition="Inside"

                    ContainerType="Outlined"

                    OutlineCornerRadius="8"

                    Padding="10"

                    Hint="Fra Vegreferanse">

                    <Entry Text="{Binding LocationData.RoadReference}"

                           FontSize="Default"

                           BackgroundColor="{DynamicResource TransparentColor}"/>

                    <inputLayout:SfTextInputLayout.TrailingView>

                        <Grid

                        ColumnDefinitions="*, Auto, Auto"

                        ColumnSpacing="0"

                        RowDefinitions="Auto">

                            <Label Text="" TextColor="{DynamicResource RedColor}"

                                FontFamily="Fontawesome"

                                VerticalOptions="Center"

                                Grid.Column="1"

                                FontSize="24"

                                IsVisible="{Binding LockBtn}">

                                <Label.GestureRecognizers>

                                    <TapGestureRecognizer Command="{Binding LockCommand}" />

                                </Label.GestureRecognizers>

                            </Label>

                            <Label Text=""

                                TextColor="{DynamicResource GreenColor}"

                                FontFamily="Fontawesome"

                                VerticalOptions="Center"

                                FontSize="24"

                                Grid.Column="1"

                                IsVisible="{Binding UnlockBtn }">

                                <Label.GestureRecognizers>

                                    <TapGestureRecognizer Command="{Binding UnlockCommand}" />

                                </Label.GestureRecognizers>

                            </Label>

                        </Grid>

                    </inputLayout:SfTextInputLayout.TrailingView>

                </inputLayout:SfTextInputLayout>

Result:

Desired Result: 

 https://help.syncfusion.com/xamarin/text-input-layout/container-type

with addition of my label icon.


What am i doing wrong?


1 Reply

ET Eswaran Thirugnanasambandam Syncfusion Team January 10, 2022 01:15 PM UTC

Hi Jostein Hauge, 
Thanks for contacting Syncfusion support.  
 
We have prepared a sample with the provided snippet and checked the reported problem “Entry won’t fit inside SfTextInputLayout”. But we are unable to reproduce it from our side. Please find and check the tested sample from the below link. 
 
 
 If you still face the problem, can you revert by modifying the sample based on your scenario, this will help us to provide you with a better solution at the earliest. 
 
Regards, 
Eswaran. 


Loader.
Up arrow icon