It seems you can't. You should work directly with the ObservableCollection
In your view model, add logic to take the command parameter and pass it through a switch statement which then navigates to the desired page for each parameter id.
Just Add **Footer="" ** in Listview XAML, solved all my problems. Thanks @Charwaka, well done!
Best Solution for this
Just Add **Footer="" ** in Listview XAML
https://xamgirl.com/quick-trick-remove-extra-separator-line-in-listview-xamarin-forms-ios/
If anyone stumbles on this and would like to know how I did it, just ask and I'll be happy to share.
thank's a lot, this is very helpfull!
Same problem. Workaround: implement a custom listview like this:
public class CustomListView:ListView
{
public CustomListView() : base(GetCachingStrategy()) { }
public CustomListView(ListViewCachingStrategy cachingStrategy) : base(cachingStrategy) { }
static ListViewCachingStrategy GetCachingStrategy()
{
switch (Device.RuntimePlatform)
{
case Device.Android:
return ListViewCachingStrategy.RecycleElement;
default:
return ListViewCachingStrategy.RetainElement;
}
}
}
@AndreiMisiukevich_ woaw, you rock... I've spend a few minutes reading your code and you even handle RTL ^_^
Most of the best developper I've seen or worked with who impressed me are from Belarus (Byelorussia ? Biélorussie ?).
I remember the first time I worked on a project with someone of your country, he was more a computer than a human and make me feel like a beginner... (I don't remember his name)
Do you guys learn to code before you learn to speack ?
Or maybe a day for you is 48h and you have twice the time to learn
@JohnHardman said:
@Jxamarin - For debugging this sort of thing, it's useful to temporarily specify a different BackgroundColor for each View/Layout.There at least two possibilities.
First, you have used a Grid, but without specifying RowDefinitions or ColumnDefinitions, or associating the StackLayout to any position in the Grid. By specifying a ColumnDefinition, you can specify how the Width is controlled.
Second, you haven't specified HorizontalOptions on any of the Views/Layouts. Most will default ok, but pop FillAndExpand or StartAndExpand on any where the default is not what is wanted.
Thanks that solved my issue
@Jxamarin - For debugging this sort of thing, it's useful to temporarily specify a different BackgroundColor for each View/Layout.
There at least two possibilities.
First, you have used a Grid, but without specifying RowDefinitions or ColumnDefinitions, or associating the StackLayout to any position in the Grid. By specifying a ColumnDefinition, you can specify how the Width is controlled.
Second, you haven't specified HorizontalOptions on any of the Views/Layouts. Most will default ok, but pop FillAndExpand or StartAndExpand on any where the default is not what is wanted.