|
|
|
@ -316,8 +316,7 @@ namespace Avalonia.Controls |
|
|
|
!AcceptsReturn && |
|
|
|
Text?.Length > 0) |
|
|
|
{ |
|
|
|
SelectionStart = 0; |
|
|
|
SelectionEnd = Text.Length; |
|
|
|
SelectAll(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
@ -673,8 +672,7 @@ namespace Avalonia.Controls |
|
|
|
SelectionEnd = StringUtils.NextWord(text, index); |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
SelectionStart = 0; |
|
|
|
SelectionEnd = text.Length; |
|
|
|
SelectAll(); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -896,7 +894,10 @@ namespace Avalonia.Controls |
|
|
|
CaretIndex = caretIndex; |
|
|
|
} |
|
|
|
|
|
|
|
private void SelectAll() |
|
|
|
/// <summary>
|
|
|
|
/// Select all text in the TextBox
|
|
|
|
/// </summary>
|
|
|
|
public void SelectAll() |
|
|
|
{ |
|
|
|
SelectionStart = 0; |
|
|
|
SelectionEnd = Text?.Length ?? 0; |
|
|
|
|