Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:catel="http://catel.codeplex.com"

 

2) Add behavior

...

Code Block

...

<ListBox ItemsSource="{Binding LogEntries}">
    <i:Interaction.Behaviors>
        <catel:AutoScroll ScrollDirection="Bottom" ScrollTreshold="10" />
    </i:Interaction.Behaviors>
</ListBox>


The ScrollDirection determines the direction (Top or Bottom).

The ScrollTreshold allows the treshold of the real offset (to determine whether auto scroll should be enabled). For example, when the user is manually scrolling, this behavior will pause.