UI_Generator icon indicating copy to clipboard operation
UI_Generator copied to clipboard

ScrollViewerAction.ScrollToBottom doesn't always scroll to bottom

Open jbhaywood opened this issue 8 years ago • 1 comments

First off, I'm not sure if this is the best place to post this because I know the scrolling functionality isn't implemented here. But I tried registering on the forum site and couldn't. No matter what I entered for the User Name it said that what I entered was invalid. For example, "abcdefg123" is invalid, according to the registration page.

Anyway, I'm wrapping a ListBox in a ScrollViewer, and added a scroll action in xaml like this...

<ScrollViewer ek:ScrollViewer.Action="{Binding ScrollAction}">
    <ItemsControl ItemsSource="{Binding LogMessages}">

And then added an event to my LogMessages ObservableCollection to set the scroll action when the collection changes, like this...

void LogMessagesChanged(object sender, NotifyCollectionChangedEventArgs e)
{
    ScrollAction = ScrollViewerAction.None;
    ScrollAction = ScrollViewerAction.ScrollToBottom;
}

It works fine as long as I don't use the scroll bar while it's running. But if I manually scroll back up the list and leave it there, the next time the collection changes, it only scrolls down part way to the bottom, not all the way. If I manually scroll down to the bottom again, it continues to work as expected.

jbhaywood avatar Aug 22 '17 14:08 jbhaywood

Thanks for reporting, i will check it out.

EmptyKeys avatar Aug 23 '17 18:08 EmptyKeys