Note that there are some explanatory texts on larger screens.

plurals
  1. POPrevent LongListMultiSelector from "auto scrolling" when inserting items at the beginning
    text
    copied!<p>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 (<code>ObservableCollection.Insert(0, item);</code>).</p> <p>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.</p> <p>Any clues?</p> <p><em>EDIT 1</em></p> <p>consider, <code>oldFirstItem</code> 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 <code>oldFirstItem</code> at the top of the items that are visble. using ScrollTo makes that list jump.</p> <p><em>EDIT 2</em> I added a picture trying to show what I want to achieve. The area above the red line is not visible.<img src="https://i.stack.imgur.com/bv9st.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload