I have a silly question and I think that I already know the answer, but still want to post it to be 100% sure.
I developed a paginable listview that will load items 20 by 20. Here is how it's working:
As you can see, my listing is limited to 20 items at any time and when the user would scroll down in a fast way, I would set some empty viewmodels to prevent the UI to be blocked by the awaitable API calls and so to allow the user to keep scrolling further. Once the user would stop scrolling, the last API call (previous ones would be cancelled of course) returning my data would fill these empty viewmodels and the wanted data would then be displayed.
My issue is the next one: I would like to implement multiple display depending on my items' properties values. I read the documentation about the DataTemplateSelector and implemented it into my project. It's working fine, but since I set some empty viewmodels when the user would scroll in a fast way, the received item into the OnSelectedTemplate method is not containing the needed data to know which DataTemplete to select.
Therefore I had to set a default UI for this specific context. My question is now : is there a way to re-set a DataTemplate after the OnSelectedTemplate method already has been executed ?
Hoping my explanations were clear enough, I thank you in advance for your responses and your time !