diffplex
diffplex copied to clipboard
No text showing in windows forms
Similar to: https://github.com/mmanela/diffplex/issues/79

Visual Studio 2022
Targeting .Net 6.0
Windows Forms
DiffPlex.Wpf 1.3.2
Tried modifying font, fore/back colors - no luck
Tested in another older project targeting .Net 4.6.1 - same behaviour
Repo replicating the issue here: https://github.com/beauholland/diffplexwinformstest
Finally figured it out.
Default ForeColor is Alpha'd out, set to: Color.FromArgb(0, 0, 0, 0) which is transparent.
Update the ForeColor to:
diffViewer1.ForeColor = Color.FromArgb(255, 0, 0, 0);
OR
(0, 0, 0);
in properties
Setting the .ForeColor is NOT enough given the other Fore Colors for things like Unchanged, Inserted etc are all set at (0, 0, 0, 0), and are still transparent
Therefore you need to update all the (0, 0, 0, 0) to at least (255, 0, 0, 0) or (0, 0, 0) - no alpha