Browse Source

Merge pull request #4433 from AvaloniaUI/fixes/4303-designwidth-height

Fix DesignWidth/DesignHeight.
pull/4455/head
Steven Kirk 6 years ago
committed by GitHub
parent
commit
4bbe128aa8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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