From 9935ffe9c48bf10617e4386146c37e693d90820b Mon Sep 17 00:00:00 2001 From: Darnell Williams Date: Sun, 6 Mar 2016 17:16:48 -0500 Subject: [PATCH] Corrects SizeToContent for both windows and control wrppers --- src/Perspex.Application/Designer/DesignerAssist.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Perspex.Application/Designer/DesignerAssist.cs b/src/Perspex.Application/Designer/DesignerAssist.cs index d0dc3c844c..de5518317f 100644 --- a/src/Perspex.Application/Designer/DesignerAssist.cs +++ b/src/Perspex.Application/Designer/DesignerAssist.cs @@ -76,8 +76,11 @@ namespace Perspex.DesignerSupport if (window == null) { - window = new Window() {Content = original, SizeToContent = SizeToContent.WidthAndHeight}; + window = new Window() {Content = original}; } + + if (!window.IsSet(Window.SizeToContentProperty)) + window.SizeToContent = SizeToContent.WidthAndHeight; } s_currentWindow?.Close();