Hello,
I'm trying to build a login form using the SfDataForm control. On Android platform it works perfectly, but when I run it on UWP I got the following exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.UWP.DataForm.Editors.DataFormPasswordEditor.OnViewLoaded(Object sender, RoutedEventArgs e)
These are the relevant part of my code.
My page:
<ContentPage mlns:dataform="clr-namespace:Syncfusion.XForms.DataForm;assembly=Syncfusion.SfDataForm.XForms" >
<dataform:SfDataForm x:Name="dataForm"
Grid.Row="1"
Margin="0,30,0,0"
CommitMode="Explicit"
DataObject="{Binding Login}"
IsReadOnly="{Binding IsBusy}"
LabelPosition="Left"
ValidationMode="Explicit">
<dataform:SfDataForm.Behaviors>
<behaviors:SfDataFormLoginBehavior />
</dataform:SfDataForm.Behaviors>
</dataform:SfDataForm>
</ContentPage>
My model:
[Display(Name = "StringEmail", Prompt = "EnterEmailAddress", ResourceType = typeof(Resx.AppResources))]
[EmailAddress(ErrorMessageResourceName = "EmailErrorMessage", ErrorMessageResourceType = typeof(Resx.AppResources))]
public string Email
{
get { return email; }
set
{
email = value;
RaisePropertyChanged(nameof(Email));
RaiseErrorChanged(nameof(Email));
}
}
[Display(Name = "StringPassword", Prompt = "EnterPassword", ResourceType = typeof(Resx.AppResources))]
[Required(AllowEmptyStrings = false, ErrorMessage = "", ErrorMessageResourceName = "PasswordErrorMessage", ErrorMessageResourceType = typeof(Resx.AppResources))]
[DataType(DataType.Password)]
public string Password
{
get { return password; }
set
{
password = value;
RaisePropertyChanged(nameof(Password));
RaiseErrorChanged(nameof(Password));
}
}
The behavior is taken from the demo code download when installing the framework.
Syncfusion nuget packages version is 16.3.0.29
Can you please help me?