Odd wrapping behavior with a fixed width on a dump container when using Util.HorizontalRun
I've noticed some add wrapping behavior when placing a horizontal run inside a dump container which has a style for a certain width. This is demonstrated with the following "C# Statements" script:
Dumping the horizontal run places the link within the whole text in a predictable way. If you place that same horizontal run inside a dump container and fix the width of the container the hyperlinq will get placed on its own line. I see the following output for the script above:
I'm unable to upload images at the moment, so hopefully I've been able to explain everything well enough.
var lHorizontalRun = Util.HorizontalRun(false,
"Check out this weird wrapping behavior by [",
new Hyperlinq(() => Console.WriteLine("Hello!"), "Clicking Here"),
"]!");
var lDumpContainer = new DumpContainer();
lDumpContainer.Style = "width: 280px;";
lDumpContainer.Content = lHorizontalRun;
lHorizontalRun.Dump();
lDumpContainer.Dump();
Dumping the horizontal run places the link within the whole text in a predictable way. If you place that same horizontal run inside a dump container and fix the width of the container the hyperlinq will get placed on its own line. I see the following output for the script above:
Check out this weird wrapping behavior by [Clicking Here]!This can also be demonstrated with just the horizontal run's dump by resizing the LINQPad window so the output window is narrower than the output. Basically the moment there is a line break, the link will always also break on its own line.
Check out this weird wrapping behavior
by [
Clicking Here]!
I'm unable to upload images at the moment, so hopefully I've been able to explain everything well enough.
Comments