I am using a LongListMultiSelector to show messages.
Newest messages are at the botton - like in a messenger.
I know have a button in the ListHeaderTemplate, that allows me to load earlier messages and insert them at the top at the list (ObservableCollection.Insert(0, item);
).
Inserting works, but it looks like that the list scrolls automatically to the last inserted item - it actually does not scroll, but it feels like it scrolls, because after the insert, the new item is displayed, but i rather looking for a solution that keeps the item visible that was the first before the new items where inserted and that i have to do another vertical scroll to the new top to reach the list header again.
Any clues?
EDIT 1
consider, oldFirstItem
is the current first item, then I insert a new item in front of the item. now the new item, becomes the first item, and since the scroll position does not change, the new item is visible: it feels like the list scrolls to the new inserted item, but it only pushed items 1 to n down. what i want is, that it pushes all new items up - into the area that the user does not see - and oldFirstItem
at the top of the items that are visble.
using ScrollTo makes that list jump.
EDIT 2
I added a picture trying to show what I want to achieve. The area above the red line is not visible.