Smoothly scroll new item into view

Views for WPF Forum

Posted 10 years ago by Jim Foye
Version: 12.2.0571

I am using the ZapPanel in a listbox, pretty much following the example. When the user clicks a button to add an item, that item is added to the end of the list, and may be over to the right some distance, requiring the user to scroll for a while to get to it. (You can see the same thing in the sample, although it's vertically oriented, but you can add items for a while, and it will be necessary to manually scroll down to see them).

I'd like to smoothly scroll over to right until that last item is the selected item. I can just simply set the listbox's selected item, but then when it becomes the selected item, everything else fades in on the left hand side, and it's not a very good visual effect (in my opinion).

I tried calling LineRight() on the ScrollViewer as many times as necessary, but this did not result what I was looking for.

Any suggestions?

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Jim,

What if you call things like ZapPanel.SetHorizontalOffset?  If you'd like us to look into it further, please make a new simple sample that shows the issue and e-mail that to our support address.  Rename the .zip file extension and reference this post.  Thanks!

Actipro Software Support

The latest build of this product (v22.1.4) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.