Skip to content

Commit 8283178

Browse files
authored
When rich text box is empty it should show hint. (#1702)
Fixes #1692
1 parent 443c1fb commit 8283178

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MaterialDesignThemes.Wpf/HintProxyFabric.RichTextBox.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public bool IsEmpty()
2424
_richTextBox.Document.ContentEnd
2525
);
2626

27-
return string.IsNullOrWhiteSpace(textRange.Text);
27+
return string.IsNullOrEmpty(textRange.Text) ||
28+
textRange.Text == Environment.NewLine;
2829
}
2930

3031
public bool IsFocused() => _richTextBox.IsKeyboardFocused;

0 commit comments

Comments
 (0)