Listbox scroll viewer - default scroll to bottom
<p>I have a <code>ListBox</code> which has to be scrolled to bottom automatically. In my application, I have to detect if some items were already visibled to user and to do some business logic if so. I am using virtualization here which calls item (vm) properties only if it is visible. </p>

<p>For auto scroll, i am using <code>listbox.ScrollIntoView(listbox.SelectedItem);</code> which works perfect, the problem is that the <code>ScrollIntoView</code> will run only after the <code>ListBox</code> is already loaded and rendered which means that it first displays some items from its beginning and after that it will scroll to bottom... it is undesirable for me. I just want to scroll immediately to bottom (before the <code>ListBox</code> is rendered).</p>

<p>Here is my behavior for auto scroll to bottom:</p>

<pre><code>protected override void OnAttached()
{
    base.OnAttached();
    this.AssociatedObject.SelectionChanged += AssociatedObject_SelectionChanged;
}

void AssociatedObject_SelectionChanged(object sender, EventArgs e)
{
    if (sender is ListBox)
    {
        ListBox listbox = (sender as ListBox);
        if (listbox.SelectedItem != null)
        {
            listbox.Dispatcher.BeginInvoke((Action)(() =&gt;
            {
                listbox.UpdateLayout();
                if (listbox.SelectedItem != null)
                {
                    listbox.ScrollIntoView(listbox.SelectedItem);
                }
            }));
        }
    }
}

protected override void OnDetaching()
{
    base.OnDetaching();
    this.AssociatedObject.SelectionChanged -= AssociatedObject_SelectionChanged;
}
</code></pre>

<p>My <code>ListBox</code> is setted to <code>IsSynchronizedWithCurrentItem="True"</code> and its <code>ItemsSource</code> is binded to <code>ICollectionView</code> where i am using <code>MoveCurrentToLast</code>.</p>

<p>So the question is: is there any way how to scroll to bottom without rendering its top first?</p>