From 4f96de0e6b27235f5cc45d5c3d8b63cdb37ef35b Mon Sep 17 00:00:00 2001 From: luthfiampas Date: Tue, 16 Feb 2021 10:32:27 +0700 Subject: [PATCH] fix slow/delay TextBox selection --- src/Avalonia.Controls/Presenters/TextPresenter.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/Presenters/TextPresenter.cs b/src/Avalonia.Controls/Presenters/TextPresenter.cs index 6bbb1c13bf..3bec46a9ac 100644 --- a/src/Avalonia.Controls/Presenters/TextPresenter.cs +++ b/src/Avalonia.Controls/Presenters/TextPresenter.cs @@ -80,7 +80,9 @@ namespace Avalonia.Controls.Presenters static TextPresenter() { AffectsRender(SelectionBrushProperty, TextBlock.ForegroundProperty, - SelectionForegroundBrushProperty, CaretBrushProperty); + SelectionForegroundBrushProperty, CaretBrushProperty, + SelectionStartProperty, SelectionEndProperty); + AffectsMeasure(TextProperty, PasswordCharProperty, RevealPasswordProperty, TextAlignmentProperty, TextWrappingProperty, TextBlock.FontSizeProperty, TextBlock.FontStyleProperty, TextBlock.FontWeightProperty, TextBlock.FontFamilyProperty);