I am using LongListMultiSelector to display messages. The latest messages in botton - as in the messenger. I know that there is a button in the ListHeaderTemplate that allows you to load earlier messages and paste them at the top of the list ( ObservableCollection.Insert(0, item);).
The insert works, but it looks like the list automatically scrolls to the last inserted item - in fact, it does not scroll, but it looks like it scrolls because after the insert, a new element is displayed, but I'm rather looking for a solution that keeps the element visible, which was first before the new elements that were inserted, and that I have to do another vertical scroll to a new vertex in order to get back to the list header.
Any clues?
EDIT 1
count oldFirstItemis the current first element, then I insert a new element in front of the element. now the new element becomes the first element, and since the scroll position does not change, the new element is visible: it seems that the list scrolls to the newly inserted element, but it only pushed elements 1 to n down. I want him to push all the new elements up - in the area that the user does not see - and oldFirstItemat the top of the elements that are displayed. using ScrollTo makes this list jumpy.
EDIT 2 I added an image, trying to show what I want to achieve. The area above the red line is not visible.
source
share