问题
In continuation of the my previous question, are the any good controls for text diffs visualization?
Something like StackOverflow's revision diff viewer but for WinForms or WPF
Requirements:
- free, preferably open-source
- based on WPF or WinForms
No apps please, only components.
I'm not interested in OSS diff tools
回答1:
There is (as part of GitSharp) an open source diff engine in c# with a very easy to use API and (as part of GitSharp.Demo) a WPF diff viewer. The code should not be too difficult to extract from the project.
Find more information here: http://www.eqqon.com/index.php/GitSharp#GitSharp.Demo
回答2:
might also want to take a look at MeneesDiffUtils. Has a bunch of diff related utils including a visualization control. Full source code provided and is under a license called CharityWare.
回答3:
I never heard about a specific .NET component for diff visualization (it's kind a niche), but perhaps you could rely on advanced editor to build your own without too much trouble.
Syncfusion proposes a complete component suite dedicated to text/code edition, with a lot of built in features that you might find useful :
- Line and selection background
- Text highlighting (colored underline, waveline, borders, strike, etc.)
- Selection margin
- Text selection
- Syntax highlighting
Important note : it is not free.
回答4:
I recommend DiffPlex. It is netstandard1.0
and very light weight.
You can easily embed it in your WPF application using the RichTextBox
like this: https://github.com/halllo/WpfDiff
来源:https://stackoverflow.com/questions/138515/text-diff-visualization-control-for-winforms-or-wpf