We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

[UWP] Focus problem

Thread ID:





148865 Nov 6,2019 03:35 PM UTC Nov 7,2019 02:07 PM UTC Xamarin.Forms 1
Tags: SfTextInputLayout
Marco Negroni
Asked On November 6, 2019 03:35 PM UTC

Good afternoon,

if i tap/click outside the SfTextInputLayout, the first control takes the focus and this isn't correct i want that the user when taps/clicks outside looses the focus.

My code:

<StackLayout Padding="16">
<sfCards:SfCardView SwipeToDismiss="False" Margin="0,20,0,0" HorizontalOptions="Center" WidthRequest="500">
<StackLayout Padding="16">
<Label x:Name="label_SfCardView_NewDatabase_Title"/>

<sfTextInputLayout:SfTextInputLayout x:Name="sfTextInputLayout_SfCardView_NewDatabase_DatabaseName" ContainerType="Outlined" OutlineCornerRadius="5" ReserveSpaceForAssistiveLabels="True" FocusedColor="#007bff" ErrorColor="#dc3545">
<Entry x:Name="entry_SfCardView_NewDatabase_DatabaseName"/>

<sfTextInputLayout:SfTextInputLayout x:Name="sfTextInputLayout_SfCardView_NewDatabase_DatabasePath" ContainerType="Outlined" OutlineCornerRadius="5" ReserveSpaceForAssistiveLabels="False" FocusedColor="#007bff" ErrorColor="#dc3545" LeadingViewPosition="Inside" IsVisible="False">
<ImageButton x:Name="imageButton_SfCardView_NewDatabase_BrowseFolder" HeightRequest="20" Aspect="AspectFit" Source="glyphicons_30_clipboard.png" Clicked="ImageButton_SfCardView_NewDatabase_BrowseFolder_Clicked"/>

<Entry x:Name="entry_SfCardView_NewDatabase_DatabasePath" IsEnabled="False"/>

<sfButtons:SfButton x:Name="sfButton_SfCardView_NewDatabase_Confirm" Margin="0,16" CornerRadius="5" HeightRequest="40" BackgroundColor="#007bff" Clicked="SfButton_SfCardView_NewDatabase_Confirm_Clicked" Text="Confirm"/>

You can find a video attached.

Thanks in advance

Attachment: 20191106_163407_e39da723.7z

Lakshmi Radha Krishnan [Syncfusion]
Replied On November 7, 2019 02:07 PM UTC


Hi Marco,


Greetings from Syncfusion.


By default, the focus is always set to the first element in UWP platform. You can observe the same behaviour with Entry instead of the SfTextInputLayout.


Please refer the reference link to avoid this issue - https://stackoverflow.com/questions/42231163/is-it-possible-to-stop-the-first-entry-getting-focus-in-a-scrollview-in-xamarin/42245601


Please check this and let us know if you need further clarification on this.



Lakshmi R.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon