Skip to content

Commit ee2e7d0

Browse files
committed
enhance: ignores $ char when measuring contents in NamedHighlightedTextBlock
Signed-off-by: leo <[email protected]>
1 parent 6517e78 commit ee2e7d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Views/NameHighlightedTextBlock.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ protected override Size MeasureOverride(Size availableSize)
5555
if (string.IsNullOrEmpty(text))
5656
return base.MeasureOverride(availableSize);
5757

58+
var trimmed = text.Replace("$", "");
5859
var typeface = new Typeface(FontFamily);
5960
var formatted = new FormattedText(
60-
Text,
61+
trimmed,
6162
CultureInfo.CurrentCulture,
6263
FlowDirection.LeftToRight,
6364
typeface,

0 commit comments

Comments
 (0)