Last Updated: 21 Aug 2018 11:34 by Valentin
Lance | Manager Technical Support
Created on: 29 Jun 2018 19:55
Category: SlideView
Type: Bug Report
SlideView: ItemTemplateSelector Not Working Correctly
Refer to the attached reproducible,

The DataTemplateSelector should be returning RedTemplate and BlueTemplate every other item. However, the SlideView is not making calls to the selector and incidentally reuses the wrong template for multiple items in a row,

Available in minor release 2018.2.821. It will also be available in the R3 2018 release.
Attached Files:
Posted on: 13 Aug 2018 02:57
Perhaps I should describe a bit what I'm trying to achieve: I'm using a slide view to simulate a wizard like user interface. Each item template describes a page in the wizard. The various controls in each slide collect data bound to properties in the containing page. 
I didn't show the bindings in my example for simplicity's sake but you get the idea.

To get the scenario working it is important that the move from page to page properly preserves the data state as provided through bindings. This has to happen whether the user swipes or uses the arrow buttons.
Posted on: 12 Aug 2018 00:26
Hi Yana, I'm attaching some code to demonstrate the behavior I observed. If you run it (I only tested on Android), you'll see a slide view with three pages, using an item template selector.
On the second page there's a RadListView set to use SelectionMode=Multiple.
Swipe from the first page to the second and select a few items in the list. Then swipe either forward or back, then back to the list page. Note how the list selection is preserved. Then, repeat the previous steps but this time use the arrow buttons to navigate back and forth. Notice the list selection is not preserved. 
While debugging I hooked up some handlers to the NativeControlLoaded and NativeControlUnloaded to print when they're called to the output. This shows that the native control is unloaded when using arrow navigation and not unloaded when using swipe navigation. I guess this is what clears the selection. Perhaps this is related to the bug I originally reported?
I suspect the layout issues I was seeing in my list view cell was related to the list being recreated and not properly measured.
Attached Files:
Posted on: 10 Aug 2018 13:17
Hi guys,

We have made good progress on resolving this issue and hopefully it will be included in the upcoming minor release.

Valentin, could you elaborate more on the erroneous behavior you've observed? If you could send us sample code we can use to reproduce the issue, that would be of great help.

Posted on: 09 Aug 2018 20:28
I've also noticed some different layout/dispose behaviour between swiping and tapping on the left/right arrows. Not sure it's related but perhaps could be addressed at the same time?
Posted on: 08 Aug 2018 13:12
This basically renders the feature useless. My exact use case would benefit from this, and without it, I have to use a clunky workaround using converters. I urge you please to squeeze this into the next release.