This question is locked. New answers and comments are not allowed.
I just noticed, that something is wrong with unsubscribing.
Trying to divide large problem into smaller pieces.
Lets start from the very beginning.
I have a page with products categories A, and page with products list B (which obviously depends on category).
In my case, while navigating from A to B, i'm sending parameter in navigation string.
That means, i cant allow VirtualDataCollection to raise ItemsLoading event before OnNavigatedTo();
So, i'm unsubscribing it in OnNavigatedFrom()
Aaand subscribe in OnNavigatedTo()
However, something is going on wrong: when i'm visiting page second time, ItemsLoading is called several times with the same parameters.
Can you check that?
Trying to divide large problem into smaller pieces.
Lets start from the very beginning.
I have a page with products categories A, and page with products list B (which obviously depends on category).
In my case, while navigating from A to B, i'm sending parameter in navigation string.
That means, i cant allow VirtualDataCollection to raise ItemsLoading event before OnNavigatedTo();
So, i'm unsubscribing it in OnNavigatedFrom()
public
void
OnNavigatedFrom()
{
VirtualDataCollection.ItemsLoading -= VirtualDataCollectionOnItemsLoading;
VirtualDataCollection.Clear();
Cleanup();
}
public
void
OnNavigatedTo()
{
VirtualDataCollection.ItemsLoading += VirtualDataCollectionOnItemsLoading;
}
However, something is going on wrong: when i'm visiting page second time, ItemsLoading is called several times with the same parameters.
Can you check that?