Open Yaroshvitaliy opened 3 years ago
@Yaroshvitaliy You will need to set "NoWrap" to false
for that to work:
@patriksvensson I tried NoWrap set to false but it didn't help me. I mean Environment.NewLine is not working.
I can see the following code in ProgressTask:
description = description?.RemoveNewLines()?.Trim();
Yeah, Environment.Newline is probably not working. It will wrap the text at the end of the column.
Environment.Newline is what I need as a separator between lines, so could you reopen the issue since my original question is not answered? Maybe anoter string/object property can be added to ProgressTask so that it can be used in custom advabced columns?
I just created my own column as initially proposed and it worked like a charm:
class MultilineTaskDescriptionColumn : ProgressColumn
{
public override IRenderable Render(RenderOptions options, ProgressTask task, TimeSpan deltaTime)
{
return new Markup(task.Description ?? string.Empty)
.Overflow(Overflow.Ellipsis)
.Justify(Justify.Left);
}
}
It would be nice if there was a Multiline
property, say, to avoid the call to RemoveNewLines()
, but it's no biggie IMO.
It would be useful to implement MultilineTaskDescriptionColumn for Progress. This didn't help me for multiline description:
Please upvote :+1: this issue if you are interested in it.