From 2931263d5d9e9c10664f4df07460b2d2a94f4ced Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 2 May 2015 14:13:52 +0200 Subject: [PATCH] Make right aligned text work. Need to supply a constraint in order to know where to align it. --- Perspex.Controls/TextBlock.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Perspex.Controls/TextBlock.cs b/Perspex.Controls/TextBlock.cs index 642f97d9a2..3ed165e624 100644 --- a/Perspex.Controls/TextBlock.cs +++ b/Perspex.Controls/TextBlock.cs @@ -133,6 +133,7 @@ namespace Perspex.Controls context.FillRectange(background, new Rect(this.Bounds.Size)); } + this.FormattedText.Constraint = this.Bounds.Size; context.DrawText(this.Foreground, new Point(), this.FormattedText); }