Added the ability to wrap text by calling DiffView.EnableTextWrapping(). This addresses issue #113
I approached this issue by creating a Boolean value(IsTextWrapEnabled) that keeps track if the text should be wrapped or not(If DiffViewer. ToggleTextWrapping() is called).
If !IsTextWrapEnabled then the Add() method would simply create a StackPanel with horizontal Orientation, which does not allow text wrapping.
However if IsTextWrapEnabled the Add() method would create a WrapPanel instead with the same orientation as StackPanel, which does allow text wrapping.
I did some styling modifications for the scenario that text wraps to make sure that number,operation,text variables align within the DiffViewer.
To further ensure text would wrap, if IsTextWrapEnabled then we would set the Horizontal scroll bar visibility to hidden/disabled
Added the ability to wrap text by calling
DiffView.EnableTextWrapping()
. This addresses issue #113IsTextWrapEnabled
) that keeps track if the text should be wrapped or not(IfDiffViewer. ToggleTextWrapping()
is called).!IsTextWrapEnabled
then theAdd()
method would simply create aStackPanel
with horizontal Orientation, which does not allow text wrapping.IsTextWrapEnabled
theAdd()
method would create aWrapPanel
instead with the same orientation asStackPanel
, which does allow text wrapping.number,operation,text
variables align within the DiffViewer.To further ensure text would wrap, if
IsTextWrapEnabled
then we would set the Horizontal scroll bar visibility to hidden/disabledBelow is an example of the text wrapping: https://github.com/user-attachments/assets/53d3d13e-6338-4336-92f9-a566412f1fbc