We need to a create new WPF tool to compare two files.
This compare tool shows the contents of two files line by line and indicates the difference in the same line.
First we create two ListViews to display both source file and target file.
So each ListView has its own vertical scroll bar and horizontal scroll bar.
What we notice is that if we scroll vertical bar in left list view and right list view does not scroll. So the line numbers are off each other. That is not we want.
We need one vertical scroll bar and both ListViews move together. So we always see the same line are aligned together.
In Visual Studio IDE 2017, comparing two files with different versions, it shows one vertical scroll bar on the right side of panel and left side panel does not show vertical scroll bar. Each panel has its own Horizonal scroll bar. When moving vertical scroll bar, it moves same lines of two files together. So the vertical bar is for both left and right panels.
we have posted question in the link:
we have got an excellent solution with two scroll bars moving together. The only limitation is that there are two vertical scroll bars.
We know Visual Studio IDE is an application of WPF. Just wonder what UI controls VS IDE 2017 uses for comparing two files? Thx!