mmanela / diffplex

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

Control DiffViewer: doesn't show text but color only #79

Closed cpallotti73 closed 3 years ago

cpallotti73 commented 3 years ago

I'm probably wrong, but the control displays the different colors in the differences lines but without text (see you image attached). Same problem if set 'ShowInline'. What am I doing wrong? DiffViewer

I use VS2019 + .net framework 4.6.1

Thanks in advance

mmanela commented 3 years ago

@kingcean Can you take a look?

kingcean commented 3 years ago

Hi @cpallotti73 could you please try to set Foreground property by a color or any kind of Brush to have a test?

mmanela commented 3 years ago

Since I haven't heard back from @cpallotti73 , closing for now

Scandal-UK commented 3 years ago

I get this behaviour as well - no matter what I do. To begin with, I thought it was due to my high-DPI monitor but it can be consistently reproduced on all the dev machines that I have. Presumably the "ElementHost" is playing up??

kingcean commented 3 years ago

Hi @Scandal-UK could you please try to set Foreground property by a color to have a test? And does this happen in WinForms or WPF application?

Scandal-UK commented 3 years ago

I have tried that - and even setting the font. This is WinForms (which I think just uses an ElementHost? I haven't looked closely), targeting .NET 5 or .NET Core 3.1.

kingcean commented 3 years ago

Could you please confirm if you are running the project DiffPlex.WindowsForms.Demo? It is demo of WinForms application.

DiffPlex.WindowsForms.Demo project

Scandal-UK commented 3 years ago

Of course not, I followed the instructions on the front page?? I have created my own control now with two RichTextBox instances in a SplitContainer (with synchronised scrolling), but I'd rather use your control.

Steps to reproduce:

kingcean commented 3 years ago

Could you please run the demo DiffPlex.WindowsForms.Demo mentioned above to have a test? Or run net5.0-windows\DiffPlex.WindowsForms.Demo.exe in DiffPlex.Win32.Demo.zip which I built locally.

Screenshot