Browse Source
Merge pull request #3081 from AvaloniaUI/fixes/2862-grid-star-design-time
Fix Grid star row/column sizing at design time
pull/3087/head
Jumar Macato
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
11 additions and
1 deletions
-
src/Avalonia.DesignerSupport/DesignWindowLoader.cs
|
|
|
@ -69,7 +69,17 @@ namespace Avalonia.DesignerSupport |
|
|
|
} |
|
|
|
|
|
|
|
if (!window.IsSet(Window.SizeToContentProperty)) |
|
|
|
window.SizeToContent = SizeToContent.WidthAndHeight; |
|
|
|
{ |
|
|
|
if (double.IsNaN(window.Width)) |
|
|
|
{ |
|
|
|
window.SizeToContent |= SizeToContent.Width; |
|
|
|
} |
|
|
|
|
|
|
|
if (double.IsNaN(window.Height)) |
|
|
|
{ |
|
|
|
window.SizeToContent |= SizeToContent.Height; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
window.Show(); |
|
|
|
Design.ApplyDesignModeProperties(window, control); |
|
|
|
|