From eafb41d6287a43c9ff00e0116edc4e77ca39de5f Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 3 Feb 2025 14:02:11 +0800 Subject: [PATCH] Fix SelectableTextBlock selection (#18049) --- src/Avalonia.Controls/SelectableTextBlock.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/SelectableTextBlock.cs b/src/Avalonia.Controls/SelectableTextBlock.cs index b0fd78b321..56eade0cd4 100644 --- a/src/Avalonia.Controls/SelectableTextBlock.cs +++ b/src/Avalonia.Controls/SelectableTextBlock.cs @@ -146,7 +146,7 @@ namespace Avalonia.Controls /// public void SelectAll() { - var text = Text; + var text = HasComplexContent ? Inlines?.Text : Text; SetCurrentValue(SelectionStartProperty, 0); SetCurrentValue(SelectionEndProperty, text?.Length ?? 0);