private void DataForm_Validated(object sender, ValidatedEventArgs e)
{
button.IsEnabled = (sender as SfDataForm).ItemManager.DataFormItems.TrueForAll(x => (x asDataFormItem).IsValid);
} |
Hi Davide,
Thanks for the update.
Currently we are analyzing on your query, we will analyze
and update you the further details in two business days (August 21, 2019). We
appreciate your patience until then.
Regards,
Ganeshamoorthy C
[XAML]
<dataForm:SfDataForm x:Name="dataForm" DataObject="{Binding LoginInfo}" Grid.Row="0"ValidationMode="LostFocus" CommitMode="LostFocus"/>
<Button x:Name="validateButton" Grid.Row="1" Text="Submit"
Command="{Binding Path=BindingContext.ValidateCommand, Source={x:Reference Name=dataForm}}" CommandParameter="{Binding Source={x:Reference Name=dataForm}}"/> |
[C#]
public DataFormViewModel()
{
loginInfo = new DataFormModel();
this.ValidateCommand = new Command<object>(this.OnValidate);
}
public Command<object> ValidateCommand { get; set; }
private void OnValidate(object dataForm)
{
var dataFormLayout = dataForm as Syncfusion.XForms.DataForm.SfDataForm;
dataFormLayout.Validate();
} |