Tag Archives: ListBox

[WPF] Auto Scroll Behavior for ListBox

If you want scroll ListBox to the end automatically when new item added in ItemsSource collection you could use following attached behavior. This approach perfectly suit for MVVM way. ListBoxBehavior.cs: using System.Windows; namespace ListBoxBehavior { /// <summary> /// ListBox AutoScroll attached properties /// </summary> public static class ListBoxBehavior { public static readonly DependencyProperty AutoScrollProperty = DependencyProperty.RegisterAttached( "AutoScroll",… Read More »