Accessing ListBoxItems

6 posts, 0 answers
  1. Igor
    Igor avatar
    29 posts
    Member since:
    Mar 2012

    Posted 12 Apr 2013 Link to this post

    I want to do an animation on the items in the RadDataBoundListobx (moving a item form one position to another). To do it, I need to access the items as ListBoxItems (the same way as the Items collection in a standard ListBox). Is it possible?
  2. Deyan
    Admin
    Deyan avatar
    2038 posts

    Posted 15 Apr 2013 Link to this post

    Hi Igor,

    Thanks for writing and for your question.

    Why don't you take a look at the already implemented animation infrastructure exposed by RadDataBoundListBox that is described here:

    http://www.telerik.com/help/windows-phone/raddataboundlistbox-features-itemanimations-overview.html

    I hope this helps.

    Greetings,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Igor
    Igor avatar
    29 posts
    Member since:
    Mar 2012

    Posted 15 Apr 2013 Link to this post

    I know about the built in animations, but there are animations only for adding and removing items. I need an animation for moving items (changing position from X to Y)
  5. Deyan
    Admin
    Deyan avatar
    2038 posts

    Posted 15 Apr 2013 Link to this post

    Hi Igor,

    Could you please share some further details on your scenario? You can also take a look at the Item Reorder functionality (help contents in the online help section available).

    Generally I would not recommend animating containers like that since you may interact with the UI virtualization mechanism and cause glitches.

    Kind regards,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  6. Igor
    Igor avatar
    29 posts
    Member since:
    Mar 2012

    Posted 15 Apr 2013 Link to this post

    I have a shopping list app. Items are in a ListBox. When I mark an item as done (by a gesture), I want that item to move to the end of the list with an animation. Something like continually swaping items in buble sort algorithm.
  7. Deyan
    Admin
    Deyan avatar
    2038 posts

    Posted 15 Apr 2013 Link to this post

    Hi Igor,

    Thanks for getting back to me and for the requested details.

    In this scenario a ListBox control is not suitable since it always displays items as they appear in the source. In other words, you cannot visually reorder items without changing their position in the data source.

    A possible solution would be to use the Item Animations feature and implement an animation that slides the item in a vertical manner and whenever an item is checked - remove it from the source collection so that the animation is triggered.

    Another approach would be to use a simple stack panel and display a portion of all available items by allowing the users to browse through items with navigation buttons. You can then again add whatever animation you need without worrying about messing with a ListBox's UI virtualization mechanism.

    Greetings,
    Deyan
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top
DevCraft banner