From cb86dfde18e8ef57596f8b4c9ba6391b54db48ef Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 29 Nov 2014 15:48:21 +0100 Subject: [PATCH] Fix initial scrollbar arrange. --- Perspex.Controls/Primitives/Track.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Perspex.Controls/Primitives/Track.cs b/Perspex.Controls/Primitives/Track.cs index 1ebb6714fe..5ee6eda8aa 100644 --- a/Perspex.Controls/Primitives/Track.cs +++ b/Perspex.Controls/Primitives/Track.cs @@ -129,13 +129,13 @@ namespace Perspex.Controls.Primitives if (this.Orientation == Orientation.Horizontal) { var width = finalSize.Width * thumbFraction; - var x = (finalSize.Width - thumb.ActualSize.Width) * valueFraction; + var x = (finalSize.Width - width) * valueFraction; thumb.Arrange(new Rect(x, 0, width, finalSize.Height)); } else { var height = finalSize.Height * thumbFraction; - var y = (finalSize.Height - thumb.ActualSize.Height) * valueFraction; + var y = (finalSize.Height - height) * valueFraction; thumb.Arrange(new Rect(0, y, finalSize.Width, height)); } }