Hi
Until recently I've been using ListBoxes just fine in WinForms, but since transferring over to WPF it's apparent they work slightly differently to what I'm used to. I've been using them as an updates box of sorts, with the following code in Forms handling live updates:
private void UpdateListBox(string text) { UpdatesListBox.Items.Add(DateTime.Now.ToString("HH:mm:ss") + ": " + text); UpdatesListBox.Update(); }
This would add the text to the listbox and update it on the fly, as intended. Since switching to WPF I've not been able to retain this functionality. From what I understand, this code should work the same as the above code but does not:
private void WriteText(string text) { UpdatesListBox.Items.Add(DateTime.Now.ToString("HH:mm:ss") + ": " + text); }Does anyone know why this is not working? Thanks