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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

LeadingViewPosition in ResourceDictionary throws System.Reflection.TargetInvocationException

Thread ID:

Created:

Updated:

Platform:

Replies:

144941 May 29,2019 01:40 PM UTC May 30,2019 09:53 AM UTC Xamarin.Forms 1
loading
Tags: SfTextInputLayout
Cesar Martinez
Asked On May 29, 2019 01:40 PM UTC

When I try to set the LeadingViewPosition of SfTextInputLayout in a ResourceDictionary it throws exception.

Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. occurred

It works when set in XAML:

<input:SfTextInputLayout LeadingViewPosition="Inside">
    <input:SfTextInputLayout.LeadingView>
        ...
    </input:SfTextInputLayout.LeadingView>
    <Entry />
</input:SfTextInputLayout>

In a ResourceDictionary it does not work:

<Style TargetType="input:SfTextInputLayout">
   <Setter Property="LeadingViewPosition" Value="Inside" />
   <Setter Property="ContainerBackgroundColor" Value="White" />
   <Setter Property="ContainerType" Value="Filled" />
   <Setter Property="Margin" Value="20, 10" />
   <Setter Property="FocusedColor" Value="{StaticResource GreenColor}" />
</Style>

Bharathiraja K [Syncfusion]
Replied On May 30, 2019 09:53 AM UTC

Hi Cesar, 
 
Thank you for your interest in Syncfusion products. 
 
We can reproduce the reported problem while setting the style in the application's App page. You can create the style in content or any other page instead of the app page to overcome the reported exception in your application.  
 
We have already logged report for this, and it will be included in our upcoming volume 2 release, which is scheduled to be rolled out in mid-June 2019. We appreciate your patience, until then. 
  
You can now track your request status, review the proposed timeline for resolution, and contact us through this link for further inquiries. 
  
 
Regards, 
Bharathi. 


CONFIRMATION

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