Carousel Selection issues

6 posts, 1 answers
  1. Ariel Ben Horesh
    Ariel Ben Horesh avatar
    22 posts
    Member since:
    Dec 2009

    Posted 12 Sep 2011 Link to this post

    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
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 13 Sep 2011 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Ariel Ben Horesh
    Ariel Ben Horesh avatar
    22 posts
    Member since:
    Dec 2009

    Posted 13 Sep 2011 Link to this post

    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
  5. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 14 Sep 2011 Link to this post

    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 >>

  6. Ariel Ben Horesh
    Ariel Ben Horesh avatar
    22 posts
    Member since:
    Dec 2009

    Posted 14 Sep 2011 Link to this post

    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
  7. Ariel Ben Horesh
    Ariel Ben Horesh avatar
    22 posts
    Member since:
    Dec 2009

    Posted 21 Sep 2011 Link to this post

    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
    
    
    
    
Back to Top
UI for WPF is Visual Studio 2017 Ready