KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a WPF ListBox that is set to scroll horizontally. The ItemsSource is bound to an ObservableCollection in my ViewModel class. Every time a new item is added, I want the ListBox to scroll to the right so that the new item is viewable. The ListBox is defined in a DataTemplate, so I am unable to access the ListBox by name in my code behind file. How can I get a ListBox to always scroll to show a latest added item? I would like a way to know when the ListBox has a new item added to it, but I do not see an event that does this.
Tags (comma-separated)
Save Edits
Cancel