From 33b57118cfe3750ccdd52689cd945ec944114bd9 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 14 Oct 2017 16:09:25 +0200 Subject: [PATCH] Bind TextPresenter.Text before CaretIndex. Otherwise if `TextBox.CaretIndex` is set before the `TextBox`'s template is applied then it will be coerced to null on the `TextPresenter` when created as `Text` will still be null at this point. --- src/Avalonia.Themes.Default/TextBox.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Themes.Default/TextBox.xaml b/src/Avalonia.Themes.Default/TextBox.xaml index 8acc97d663..87d8c22663 100644 --- a/src/Avalonia.Themes.Default/TextBox.xaml +++ b/src/Avalonia.Themes.Default/TextBox.xaml @@ -46,10 +46,10 @@ Text="{TemplateBinding Watermark}" IsVisible="{TemplateBinding Path=Text, Converter={Static StringConverters.NullOrEmpty}}"/>