|
@@ -216,8 +216,11 @@ public partial class DynamicEditorForm : ThemableChromelessWindow, IDynamicEdito
|
|
|
var desiredheight = Form.ContentHeight + spareheight;
|
|
|
var desiredwidth = Form.ContentWidth + sparewidth;
|
|
|
|
|
|
- var maxheight = screen.WorkingArea.Height - 0;
|
|
|
+ var oldHeight = Height;
|
|
|
+
|
|
|
+ var maxheight = screen.WorkingArea.Height - 300;
|
|
|
Height = desiredheight > maxheight ? maxheight : desiredheight;
|
|
|
+ Top += (oldHeight - Height) / 2;
|
|
|
|
|
|
var maxwidth = screen.WorkingArea.Width - 0;
|
|
|
Width = desiredwidth > maxwidth ? maxwidth : desiredwidth;
|
|
@@ -264,4 +267,9 @@ public partial class DynamicEditorForm : ThemableChromelessWindow, IDynamicEdito
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
+
|
|
|
+ private void ThemableChromelessWindow_Loaded(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ SetSize();
|
|
|
+ }
|
|
|
}
|