mmanela / diffplex

DiffPlex is Netstandard 1.0+ C# library to generate textual diffs.
Apache License 2.0
996 stars 183 forks source link

Add WPF controls #49

Closed kingcean closed 4 years ago

kingcean commented 4 years ago

Contains following WPF controls in project DiffPlex.Wpf.

You can customize the foregrounds and backgrounds for each change type of line.

Sample

Following is an example for side by side diff viewer control.

<diffplex:SideBySideDiffViewer x:Name="SideBySideDiff" />
var builder = new SideBySideDiffBuilder(new Differ());
SideBySideDiff.DiffModel = builder.BuildDiffModel(OldText, NewText);

The project DiffPlex.Wpf.Demo is a simple demo you can see for details.

DiffPlexWpfDemo

kingcean commented 4 years ago

Need update the build service to use the SDK of .NET Core 3.1 to build.

mmanela commented 4 years ago

Thanks for the PR, I updated master to ensure core 3.1 is run

kingcean commented 4 years ago

So will you merge this pull request and upload a new nuget package?

mmanela commented 4 years ago

@kingcean This looks great. Can you also update the readme to add a section about this? Maybe a screen shot and a sample code?

kingcean commented 4 years ago

OK. Updated.

mmanela commented 4 years ago

Thanks Ill take a look soon

mmanela commented 4 years ago

@kingcean Published https://www.nuget.org/packages/DiffPlex.Wpf/