I am developing a WPF application that has a listbox. In a standard windows form when I added an item to a listbox I could just use the TopIndex feature but that is not available in a WPF window.
I have tried ScrollIntoView but I cannot get it to work. Any help would be appreciated.
Public Sub UpdateStatus(ByVal s As String)
Dim currDateTime As DateTime = DateTime.Now
Dim sDateTime As String
If (s <> gsLine) Then
sDateTime = currDateTime.ToString("yyyyMMdd-HH:mm:ss> ")
sDateTime = ""
listStatus.Items.Add(sDateTime + s)
listStatus.ScrollIntoView(listStatus.Items.Count - 1)