Browse Source

Fix DesignWidth/DesignHeight.

Ensure that design mode properties are set before setting `SizeToContent`.
pull/4433/head
Steven Kirk 6 years ago
parent
commit
802b459275
  1. 3
      src/Avalonia.DesignerSupport/DesignWindowLoader.cs

3
src/Avalonia.DesignerSupport/DesignWindowLoader.cs

@ -69,6 +69,8 @@ namespace Avalonia.DesignerSupport
window = new Window() {Content = (Control)control};
}
Design.ApplyDesignModeProperties(window, control);
if (!window.IsSet(Window.SizeToContentProperty))
{
if (double.IsNaN(window.Width))
@ -83,7 +85,6 @@ namespace Avalonia.DesignerSupport
}
}
window.Show();
Design.ApplyDesignModeProperties(window, control);
return window;
}
}

Loading…
Cancel
Save