Hi!
I follow your sample for the Xamarin.Forms listview. But I need to use bahavior to respect the MVVM patturn. So I go my 2 behavior (one for selection and the other for LoadOnDemand)
lvAppels.Behaviors.Add(
new
EventToCommandBehavior
{
EventName =
"ItemTapped"
,
Command = ((AppelsViewModel)BindingContext).ItemTappedCommand,
Converter =
new
ItemTappedEventArgsConverter()
});
lvAppels.Behaviors.Add(
new
EventToCommandBehavior
{
EventName =
"LoadOnDemand"
,
Command = ((AppelsViewModel)BindingContext).LoadOnDemandCommand
});
That work good but when the Listview is created or when I scroll down the LoadOnDemand is called several time. I think is because I do not call
this
.listView.IsLoadOnDemandActive =
false
;
But how I can do that from the viewModel without breaking the MVVM?!