This is a migrated thread and some comments may be shown as answers.

Carousel Selection issues

5 Answers 85 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Ariel Ben Horesh
Top achievements
Rank 1
Ariel Ben Horesh asked on 12 Sep 2011, 03:39 PM
Hey,
I've got strange issues with SelectedItem Binding of the Carousel, I believe it is due to virtualization, as when an item is visible somewhere along the rendered items, I am able to "jump" to the card of the item when I'm manipulating the SelectedItem binding.
if it's not visible than nothing is happening.

If I am correct with my assumption, how do I disable virtualization assuming this is what I need to do :)

Thanks
Ariel

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 13 Sep 2011, 12:41 PM
Hi Ariel Ben Horesh,

May you clarify a bit what is the scenario that you want to achieve and how are you trying to ? Generally, the recommended way is always to work with the underlying data item, not with the visual elements.


Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Ariel Ben Horesh
Top achievements
Rank 1
answered on 13 Sep 2011, 04:09 PM
Hey Maya,
Thanks!
Of course, the situation is fairly simple, I've got a carousel control binded to my ViewModel in regards to ItemsSource and SelectedItem.
SelectedItem is binded two way, when my UI logic wishes to change the selected item it set the VM property which in turn changes the SelectedItem of the carousel, this is fairly standard usage of a Listbox, etc.
What I noticed is that the Selected Item changes in the carousel only if its visible. I'm almost certain it is due to virtualization, doesn't it ring a bell?

Thanks
Ariel
0
Accepted
Maya
Telerik team
answered on 14 Sep 2011, 12:32 PM
Hi Ariel Ben Horesh,

Please take a look at the sample project attached. Do you want to achieve something similar to this ?
 

Best wishes,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Ariel Ben Horesh
Top achievements
Rank 1
answered on 14 Sep 2011, 03:17 PM
OK, so I am guessing the key is this enigmatic BringDataItemIntoView method. Which is a shame because I will need to hack stuff so MVVM regular databinding will work. oh well, I'll try report back. Thanks Maya (BTW: do you have a twitter account?) Ariel
0
Ariel Ben Horesh
Top achievements
Rank 1
answered on 21 Sep 2011, 01:19 PM
Hey,
I needed to change my implementation to ListBox + RadCaruoselPanel, Because I needed to manipulate scaling, etc. So now I can't call BringDataItemIntoView() anymore. Please advice. Ariel


Tags
Carousel
Asked by
Ariel Ben Horesh
Top achievements
Rank 1
Answers by
Maya
Telerik team
Ariel Ben Horesh
Top achievements
Rank 1
Share this question
or