Hi,
the Exception is caused by the DevExpress Framework. I will close this issue.
Thanks
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am using Xamarin Forms 5.0.0.2012 in combination with Devexpress Xamarin Form 20.2.5 for an Android 8.1 device.
I am getting quite regularly the following exception when switching between input field and enter data within a DataFormView.
On my Android device I've hidden the virtual Keyboard globally (not part of my code).
Basically my Object look the follwoing:
[public abstract class Base : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string name = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
string baseObject;
public string BaseObjectField { get => baseObject; set { baseObject = value; OnPropertyChanged(); } }
}
public class InheritedObject : Base
{
[DataFormDisplayOptions(LabelText = "Fermenter", LabelPosition = DataFormLabelPosition.Top, IsReadOnly = false)]
[DataFormItemPosition(RowOrder = 1, ItemOrderInRow = 2)]
[DataFormComboBoxEditor(InplaceLabelText = "choose", IsFilterEnabled = true)]
[ClearData]
public new string BaseObjectField
{
get => base.BaseObject;
set
{
base.BaseObject = value;
if(value != null)
SomeOtherField = GetValue(value);
}
}
decimal? someotherfield;
public decimal? SomeOtherfField { get => someotherfield; set { someotherfield = value; OnPropertyChanged() } }
}
public class ComboBoxDataProvider : IPickerSourceProvider
{
private Base baseobj;
public ComboBoxDataProvider(Base base)
{
baseobj = base;
}
public IEnumerable GetSource(string propertyName)
{
if(propertyName.Equals("BaseObjectField")
{
return LocalDataStore.Instance.Lookups.BaseObjects.Select(x => x.Name);
}
}
}
public class GenericModelPage<T> : ContentPage where T : Base, new()
{
var masterForm = new DataFormView()
{
CommitMode = CommitMode.PropertyChanged,
ValidationMode = CommitMode.LostFocus
};
var dto = new T();
BindingContext = _viewModel = new GenericViewModel<T>(Navigation, this)
{
DtoObject = dto
}
masterForm.DataObject = dto;
masterForm.PickerSourceProvider = new ComboBoxDataProvider(dto)
}][1]
Hi,
the Exception is caused by the DevExpress Framework. I will close this issue.
Thanks