From 938e07422ad9d202e37a1e03f027201487a54254 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Fri, 15 Jan 2016 17:42:06 +0100 Subject: [PATCH] Invalidate TextBlock.FormattedText when attached to logical tree. As inherited properties can change when this happens. --- src/Perspex.Controls/TextBlock.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Perspex.Controls/TextBlock.cs b/src/Perspex.Controls/TextBlock.cs index ea749be84e..65ee4b5f70 100644 --- a/src/Perspex.Controls/TextBlock.cs +++ b/src/Perspex.Controls/TextBlock.cs @@ -392,5 +392,11 @@ namespace Perspex.Controls return new Size(); } + + protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e) + { + base.OnAttachedToLogicalTree(e); + InvalidateFormattedText(); + } } } \ No newline at end of file