Skip to content

Commit ffc43a0

Browse files
updated the comment
1 parent f23c5b7 commit ffc43a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Controls/src/Core/Label/Label.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ static void OnTextPropertyChanged(BindableObject bindable, object oldvalue, obje
376376
var wasEmpty = string.IsNullOrEmpty(oldvalue as string);
377377
var isEmpty = string.IsNullOrEmpty(newvalue as string);
378378

379-
// Always invalidate when text transitions between empty and non-empty,
379+
// Always invalidate when text transitions between empty and non-empty
380+
// for labels that can grow in at least one direction (IsLabelSizeable),
380381
// even for single-line horizontally-fixed labels (e.g. TailTruncation in
381382
// a VerticalStackLayout), because the label height changes from 0 to line height.
382383
if (TextChangedShouldInvalidateMeasure(label) || (wasEmpty != isEmpty && IsLabelSizeable(label)))

0 commit comments

Comments
 (0)