Search code examples
c#wpfrefreshmultiple-monitors

WPF TreeView Displaying Incorrectly with Multiple Monitors


I have a problem in that my application works fine normally, but I have a user with 2 monitors and he has the following problem when the application is on the second monitor:

The following screen shots were taken from a single file. It seems when the names start with several of the same characters and they are right on the top edge of the treeview, the names are not updated.

On the file there are 4 named ‘DOVI*’ from 20-23 but when ‘DOVI21’ is the first one displayed, the name displayed is the same as the second one(‘DOVI22’). I see this same name display error for those that start with 2 characters that are the same too. And if this wasn’t hard enough to understand, the error only happens when viewing the application on my second monitor.

Here are the screenshots:

Correct:

enter image description here

Incorrect:

enter image description here

Update: I have virtualization of the treeview turned on and also have the IsDeferredScrollingEnabled property set to true on the scrollviewer of the treeview. I don't know if that is relevant or not.

Another Update: I had another user with multiple monitors try to replicate the issue and he could not. I had the initial user reboot thinking it was just some weird OS display issue. This didn't work so I am going to have him swap his monitors to determine if it is a graphics/driver issue.


Solution

  • It seems this was some strange driver or OS issue. None of my other users can duplicate the issue despite being on the same OS with the same or similar hardware and accessories.